Skip to content

Commit

Permalink
updated some sprintf() calls to snprint()
Browse files Browse the repository at this point in the history
  • Loading branch information
bebopagogo committed Jan 14, 2023
1 parent 92927c8 commit c046396
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/normSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const char* NormNodeGetAddressString(NormNodeHandle node)
else
addrFamily = AF_INET6;
inet_ntop(addrFamily, addr, text, 31);
sprintf(text + strlen(text), "/%hu", port);
snprintf(text + strlen(text), 64 - strlen(text), "/%hu", port);
return text;
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/python/normCast.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def get_arg_options():
parser = argparse.ArgumentParser(description='Optional app description')

## Required positional argument
parser.add_argument('--id', type=int, #required=True,
parser.add_argument('--id', type=int, required=True,
help='id <nodeIdInteger>')

parser.add_argument('--send', '-S',nargs='+',
Expand Down

0 comments on commit c046396

Please sign in to comment.