Another take at fixing 64bit problems. PJ_MAX_OBJ_NAME is increased to 32 chars (from 16), and check all those sprintf's especially the ones with "%p" format.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@635 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjlib/src/pj/os_error_linux_kernel.c b/pjlib/src/pj/os_error_linux_kernel.c
index e9c7e2a..8294ae7 100644
--- a/pjlib/src/pj/os_error_linux_kernel.c
+++ b/pjlib/src/pj/os_error_linux_kernel.c
@@ -57,14 +57,14 @@
int platform_strerror( pj_os_err_type os_errcode,
char *buf, pj_size_t bufsize)
{
- char errmsg[32];
+ char errmsg[PJ_ERR_MSG_SIZE];
int len;
/* Handle EINVAL as special case so that it'll pass errno test. */
if (os_errcode==EINVAL)
strcpy(errmsg, "Invalid value");
else
- sprintf(errmsg, "errno=%d", os_errcode);
+ snprintf(errmsg, sizeof(errmsg), "errno=%d", os_errcode);
len = strlen(errmsg);