summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/os_error_linux_kernel.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-07-29 20:29:24 +0000
committerBenny Prijono <bennylp@teluu.com>2006-07-29 20:29:24 +0000
commit8437d671f9c4c0fdd2d5d29f8741173391196e1c (patch)
treed3be6f832e41d7f49fabd8cd91996ddd1b392418 /pjlib/src/pj/os_error_linux_kernel.c
parentdfc70260daca970cc1df362f26fd669d75812eb0 (diff)
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: http://svn.pjsip.org/repos/pjproject/trunk@635 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/os_error_linux_kernel.c')
-rw-r--r--pjlib/src/pj/os_error_linux_kernel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pjlib/src/pj/os_error_linux_kernel.c b/pjlib/src/pj/os_error_linux_kernel.c
index e9c7e2af..8294ae75 100644
--- a/pjlib/src/pj/os_error_linux_kernel.c
+++ b/pjlib/src/pj/os_error_linux_kernel.c
@@ -57,14 +57,14 @@ PJ_DEF(void) pj_set_netos_error(pj_status_t code)
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);