Skip to content

Commit

Permalink
Merge pull request #8 from Meckazin/fix/zu
Browse files Browse the repository at this point in the history
Change %zu to %Iu
  • Loading branch information
Meckazin authored Jul 16, 2024
2 parents b9ba1b1 + ec4f545 commit a0f526a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,33 @@ on:

name: build
jobs:
bof-lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: NoZuFormatter
run: |
cpp_files=$(find . -type f -wholename "*-BOF/*.cpp")
found=0
for file in $cpp_files;
do
if grep -Hn "%zu" "$file";
then
found=1
fi
done
if [ $found -eq 1 ];
then
echo "Found %zu in file. Beacon does not support this, change it to %Iu"
exit 1
else
exit 0
fi
build:
runs-on: windows-2022
needs: bof-lint
steps:
- uses: ilammy/msvc-dev-cmd@v1
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions CredentialKatz-BOF/CredentialKatz/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ extern "C" {
#ifdef _DEBUG
BeaconPrintf(CALLBACK_OUTPUT, "Address of beginNode: 0x%p\n", (void*)credentialMap.beginNode);
BeaconPrintf(CALLBACK_OUTPUT, "Address of firstNode: 0x%p\n", (void*)credentialMap.firstNode);
BeaconPrintf(CALLBACK_OUTPUT, "Size of the credential map: %zu\n", credentialMap.size);
BeaconPrintf(CALLBACK_OUTPUT, "Size of the credential map: %Iu\n", credentialMap.size);
#endif // _DEBUG

BeaconPrintf(CALLBACK_OUTPUT, "Number of available credentials: %zu\n\n", credentialMap.size);
BeaconPrintf(CALLBACK_OUTPUT, "Number of available credentials: %Iu\n\n", credentialMap.size);

if (credentialMap.firstNode == 0) //CookieMap was empty
{
Expand Down

0 comments on commit a0f526a

Please sign in to comment.