diegoknight95
New Member
- Joined
- Dec 13, 2009
- Messages
- 37
- Reaction score
- 2
i have this error when i compiling in ubuntu 20.04 in forgottenserver 0.4 by fir3element
C++:
[ 94%] Building CXX object CMakeFiles/theforgottenserver.dir/src/trashholder.cpp.o
/home/dd105381/3777/src/tools.cpp: In function ‘std::string transformToMD5(std::string, bool)’:
/home/dd105381/3777/src/tools.cpp:42:22: warning: ‘%.2X’ directive writing 2 bytes into a region of size between 1 and 33 [-Wformat-overflow=]
42 | sprintf(output, "%s%.2X", output, md[i]);
| ^~~~
/home/dd105381/3777/src/tools.cpp:42:19: note: directive argument in the range [0, 255]
42 | sprintf(output, "%s%.2X", output, md[i]);
| ^~~~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/libxml2/libxml/xmlmemory.h:15,
from /home/dd105381/3777/src/otpch.h:28,
from /home/dd105381/3777/src/tools.cpp:17:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 3 and 35 bytes into a destination of size 33
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dd105381/3777/src/tools.cpp: In function ‘std::string transformToSHA1(std::string, bool)’:
/home/dd105381/3777/src/tools.cpp:61:22: warning: ‘%.2X’ directive writing 2 bytes into a region of size between 1 and 41 [-Wformat-overflow=]
61 | sprintf(output, "%s%.2X", output, md[i]);
| ^~~~
/home/dd105381/3777/src/tools.cpp:61:19: note: directive argument in the range [0, 255]
61 | sprintf(output, "%s%.2X", output, md[i]);
| ^~~~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/libxml2/libxml/xmlmemory.h:15,
from /home/dd105381/3777/src/otpch.h:28,
from /home/dd105381/3777/src/tools.cpp:17:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 3 and 43 bytes into a destination of size 41
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dd105381/3777/src/tools.cpp: In function ‘std::string transformToSHA256(std::string, bool)’:
/home/dd105381/3777/src/tools.cpp:80:22: warning: ‘%.2X’ directive writing 2 bytes into a region of size between 1 and 65 [-Wformat-overflow=]
80 | sprintf(output, "%s%.2X", output, md[i]);
| ^~~~
/home/dd105381/3777/src/tools.cpp:80:19: note: directive argument in the range [0, 255]
80 | sprintf(output, "%s%.2X", output, md[i]);
| ^~~~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/libxml2/libxml/xmlmemory.h:15,
from /home/dd105381/3777/src/otpch.h:28,
from /home/dd105381/3777/src/tools.cpp:17:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 3 and 67 bytes into a destination of size 65
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dd105381/3777/src/tools.cpp: In function ‘std::string transformToSHA512(std::string, bool)’:
/home/dd105381/3777/src/tools.cpp:99:22: warning: ‘%.2X’ directive writing 2 bytes into a region of size between 1 and 129 [-Wformat-overflow=]
99 | sprintf(output, "%s%.2X", output, md[i]);
| ^~~~
/home/dd105381/3777/src/tools.cpp:99:19: note: directive argument in the range [0, 255]
99 | sprintf(output, "%s%.2X", output, md[i]);
| ^~~~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/libxml2/libxml/xmlmemory.h:15,
from /home/dd105381/3777/src/otpch.h:28,
from /home/dd105381/3777/src/tools.cpp:17:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 3 and 131 bytes into a destination of size 129
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 96%] Building CXX object CMakeFiles/theforgottenserver.dir/src/vocation.cpp.o