Commit b15e5b79 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

msg_parser.h: avoiding bug in Solaris X86 memccpy()

Problem reported by Michael Jerris.

parent 29c637e8
......@@ -200,9 +200,11 @@ SOFIAPUBFUN issize_t msg_parse_next_field(su_home_t *home, msg_header_t *prev,
/** Duplicate string. @HI */
#define MSG_STRING_DUP(p, d, s) \
(void)((s)?((p)=(char*)memccpy((void *)((d)=(char*)p),(s),0,SIZE_MAX))\
(void)((s)?((p)=(char*)memccpy((void *)((d)=(char*)p),(s),0,INT_MAX))\
/* Solaris has broken memccpy - it considers last argument as signed */
/** Calculate string size. @HI */
#define MSG_STRING_SIZE(s) ((s) ? (strlen(s) + 1) : 0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment