Ticket #1024 (closed defect: wontfix)

Opened 9 years ago

Last modified 9 years ago

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) (diff)

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

comment:1 Changed 9 years ago by bennylp

  • Status changed from new to closed
  • Resolution set to wontfix
  • Description modified (diff)

comment:2 Changed 9 years ago by bennylp

  • Description modified (diff)
Note: See TracTickets for help on using tickets.