#1024 closed defect (wontfix)
Problem with snprintf with uClibc
Reported by: | bennylp | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | Known-Issues-and-Ideas |
Component: | common | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: |
Description (last modified by bennylp)
PJSIP assumes that an snprintf of "%.*s" will nicely print nothing if the supplied arguments are 0 and NULL. Unfortunately some Libc library (such as uClibc) would print "(null)" instead.
It has been suggested that PJSIP should be changed so that it uses empty string ("") instead of NULL when the string length is zero, but this would require modifications in too many places. And I feel that this is not the right solution anyway since I believe we comply with ANSI C.
We suggest that uClibc should be fixed instead. The offending lines are in libc/stdio/_vprintf.c, just search for "(null)" and replace it with an empty string.
Thanks Alfonso Ortega for the info.
Change History (2)
comment:1 Changed 15 years ago by bennylp
- Description modified (diff)
- Resolution set to wontfix
- Status changed from new to closed
comment:2 Changed 15 years ago by bennylp
- Description modified (diff)