- Timestamp:
- Oct 31, 2019, 10:56:53 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/sh_utils.h
r382 r552 179 179 /* returns freshly allocated memory, return value should be free'd 180 180 */ 181 char * sh_util_safe_name (const char * name) SH_GNUC_MALLOC SH_GNUC_PURE;182 183 char * sh_util_safe_name_keepspace (const char * name) SH_GNUC_MALLOC SH_GNUC_PURE;181 char * sh_util_safe_name (const char * name) SH_GNUC_MALLOC; 182 183 char * sh_util_safe_name_keepspace (const char * name) SH_GNUC_MALLOC; 184 184 185 185 /* check max size of printf result string -
trunk/src/sh_static.c
r539 r552 1765 1765 if (buflen<256) 1766 1766 return ERANGE; 1767 strncpy(buf, name, buflen );1767 strncpy(buf, name, buflen-1); 1768 1768 1769 1769 /* First check if this is already an address */ … … 1792 1792 } 1793 1793 1794 strncpy(buf, a.dotted, buflen );1794 strncpy(buf, a.dotted, buflen-1); 1795 1795 free(a.dotted); 1796 1796 … … 2013 2013 } 2014 2014 2015 strncpy(buf, a.dotted, buflen );2015 strncpy(buf, a.dotted, buflen-1); 2016 2016 free(a.dotted); 2017 2017 -
trunk/src/slib.c
r544 r552 257 257 { 258 258 sl_snprintf (val, 81, _("\n--------- %10s "), file); 259 sl_strlcpy (msg, val, 80);259 sl_strlcpy (msg, val, sizeof(msg)); 260 260 sl_snprintf (val, 81, _(" --- %6d ---------\n"), line); 261 sl_strlcat (msg, val, 80);261 sl_strlcat (msg, val, sizeof(msg)); 262 262 sh_log_console (msg); 263 263 }
Note:
See TracChangeset
for help on using the changeset viewer.