You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc: In function ‘bool array_valueOf(JSContext*, unsigned int, JS::Value*)’:
/home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:46:44: warning: ‘%d’ directive output truncated writing between 1 and 3 bytes into a region of size 0 [-Wformat-truncation=]
46 | snprintf((char )&buffer[charIndex], 4, "%d", data[0]);
| ^~
/home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:46:43: note: directive argument in the range [0, 255]
46 | snprintf((char )&buffer[charIndex], 4, "%d", data[0]);
| ^~~~
In file included from /usr/include/stdio.h:980,
from /home/philippe/Sources/PythonMonkey/_spidermonkey_install/include/mozjs-130a1/mozilla/Assertions.h:68,
from /home/philippe/Sources/PythonMonkey/_spidermonkey_install/include/mozjs-130a1/mozilla/AlreadyAddRefed.h:14,
from /home/philippe/Sources/PythonMonkey/_spidermonkey_install/include/mozjs-130a1/jsapi.h:12,
from /home/philippe/Sources/PythonMonkey/include/PyBaseProxyHandler.hh:14,
from /home/philippe/Sources/PythonMonkey/include/PyObjectProxyHandler.hh:14,
from /home/philippe/Sources/PythonMonkey/include/PyBytesProxyHandler.hh:15,
from /home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:12:
In function ‘int snprintf(char, size_t, const char, ...)’,
inlined from ‘bool array_valueOf(JSContext*, unsigned int, JS::Value*)’ at /home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:46:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:54:35: note: ‘__builtin___snprintf_chk’ output between 2 and 4 bytes into a destination of size 0
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
Standalone code to reproduce the issue
No response
Relevant log output or backtrace
No response
Additional info if applicable
No response
What branch of PythonMonkey were you developing on? (If applicable)
No response
The text was updated successfully, but these errors were encountered:
Issue type
Bug
How did you install PythonMonkey?
None
OS platform and distribution
No response
Python version (
python --version
)No response
PythonMonkey version (
pip show pythonmonkey
)No response
Bug Description
Regression introduced by #417: build warnings
/home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc: In function ‘bool array_valueOf(JSContext*, unsigned int, JS::Value*)’:
/home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:46:44: warning: ‘%d’ directive output truncated writing between 1 and 3 bytes into a region of size 0 [-Wformat-truncation=]
46 | snprintf((char )&buffer[charIndex], 4, "%d", data[0]);
| ^~
/home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:46:43: note: directive argument in the range [0, 255]
46 | snprintf((char )&buffer[charIndex], 4, "%d", data[0]);
| ^~~~
In file included from /usr/include/stdio.h:980,
from /home/philippe/Sources/PythonMonkey/_spidermonkey_install/include/mozjs-130a1/mozilla/Assertions.h:68,
from /home/philippe/Sources/PythonMonkey/_spidermonkey_install/include/mozjs-130a1/mozilla/AlreadyAddRefed.h:14,
from /home/philippe/Sources/PythonMonkey/_spidermonkey_install/include/mozjs-130a1/jsapi.h:12,
from /home/philippe/Sources/PythonMonkey/include/PyBaseProxyHandler.hh:14,
from /home/philippe/Sources/PythonMonkey/include/PyObjectProxyHandler.hh:14,
from /home/philippe/Sources/PythonMonkey/include/PyBytesProxyHandler.hh:15,
from /home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:12:
In function ‘int snprintf(char, size_t, const char, ...)’,
inlined from ‘bool array_valueOf(JSContext*, unsigned int, JS::Value*)’ at /home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:46:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:54:35: note: ‘__builtin___snprintf_chk’ output between 2 and 4 bytes into a destination of size 0
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
Standalone code to reproduce the issue
No response
Relevant log output or backtrace
No response
Additional info if applicable
No response
What branch of PythonMonkey were you developing on? (If applicable)
No response
The text was updated successfully, but these errors were encountered: