[h323plus] bug in dyna.cxx

Alessandro Angeli packetizer.com at riseoftheants.com
Tue Jan 11 17:31:39 EST 2011


From: "Jan Willamowius" <jan at willamowius.de>
Date: Tuesday 11 January 2011 16:30

> the initialization is fixed in the CVS now. Thanks!

Wouldn't an #else make more sense than the memset()? After all, 
initialization is already guaranteed if the envvar is set or the default 
is defined. This is the fix I used:

  if (env != NULL)
    strcpy(ptlibPath, env);
#ifdef P_DEFAULT_PLUGIN_DIR
  else
    strcpy(ptlibPath, P_DEFAULT_PLUGIN_DIR);
#else
  else
    strcpy(ptlibPath, "");
#endif

Or, more compact:

(void)strcpy(ptlibPath,env ? env :
#  ifdef P_DEFAULT_PLUGIN_DIR
     P_DEFAULT_PLUGIN_DIR
#  else
     ""
#  endif
);

> If you could provide a patch to switch to safe string routines that
> would be great. So far we don't have any other volunteers.

Well, I don't even have a working build yet :-) For now I'll just keep
reporting the bugs I find until I have something working.

-- 
Alessandro







More information about the h323plus mailing list