Advertisement
ZoriaRPG

ffasm.cpp overflow warnings to fix

Dec 16th, 2018
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.11 KB | None | 0 0
  1. /home/peter/Projects/ZeldaClassic/src/ffasm.cpp: In function int set_argument(char*, ffscript**, int, int):
  2. /home/peter/Projects/ZeldaClassic/src/ffasm.cpp:2137:39: warning: %s directive writing up to 63 bytes into a region of size 20 [-Wformat-overflow=]
  3.                  else sprintf(tempvar, "%s%d", variable_list[i].name, j);
  4.                                        ^~~~~~
  5. /home/peter/Projects/ZeldaClassic/src/ffasm.cpp:2137:29: note: sprintf output between 2 and 75 bytes into a destination of size 20
  6.                  else sprintf(tempvar, "%s%d", variable_list[i].name, j);
  7.                       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8. /home/peter/Projects/ZeldaClassic/src/ffasm.cpp:2136:38: warning: %s directive writing up to 63 bytes into a region of size 20 [-Wformat-overflow=]
  9.                      sprintf(tempvar, "%s%d", variable_list[i].name, j+1);
  10.                                       ^~~~~~
  11. /home/peter/Projects/ZeldaClassic/src/ffasm.cpp:2136:28: note: sprintf output between 2 and 75 bytes into a destination of size 20
  12.                      sprintf(tempvar, "%s%d", variable_list[i].name, j+1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement