I think the file safe_string.h should be equal in 3_0 and HEAD can you sync them?
here's the current diff between them, there're no logic differences only formating changes:
=================================================================== RCS file: /cvsroot/samba/source/include/safe_string.h,v retrieving revision 1.12.2.8 retrieving revision 1.25 diff -u -r1.12.2.8 -r1.25 --- samba/source/include/safe_string.h 2003/03/27 05:17:28 1.12.2.8 +++ samba/source/include/safe_string.h 2003/03/27 05:11:25 1.25 @@ -113,23 +113,23 @@
#endif /* HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS */
+/* the addition of the DEVELOPER checks in safe_strcpy means we must + * update a lot of code. To make this a little easier here are some + * functions that provide the lengths with less pain */ +#define pstrcpy_base(dest, src, pstring_base) \ + safe_strcpy(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1) + #define safe_strcpy_base(dest, src, base, size) \ safe_strcpy(dest, src, size-PTR_DIFF(dest,base)-1)
-/* String copy functions - macro hell below adds 'type checking' (limited, - but the best we can do in C) and may tag with function name/number to - record the last 'clobber region' on that string */ +/* String copy functions - macro hell below adds 'type checking' + (limited, but the best we can do in C) and may tag with function + name/number to record the last 'clobber region' on that string */
#define pstrcpy(d,s) safe_strcpy((d), (s),sizeof(pstring)-1) #define pstrcat(d,s) safe_strcat((d), (s),sizeof(pstring)-1) #define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1) #define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1) - -/* the addition of the DEVELOPER checks in safe_strcpy means we must - * update a lot of code. To make this a little easier here are some - * functions that provide the lengths with less pain */ -#define pstrcpy_base(dest, src, pstring_base) \ - safe_strcpy(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1)
/* Inside the _fn variants of these is a call to clobber_region(), -
---------------------------------------------------
metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <[EMAIL PROTECTED]>