summaryrefslogtreecommitdiffstats
path: root/source/include/safe_string.h
Commit message (Collapse)AuthorAgeFilesLines
* The definition of pstrcpy_base(), and the preceeding comments, were givenChristopher R. Hertel2003-03-271-9/+3
| | | | | | twice (probably a cut/paste error). The definition of pstrcpy_base(), and the preceeding comments, were given twice (probably a cut/paste error).
* Small clenaup patches:Andrew Bartlett2003-03-221-25/+25
| | | | | | | | | | | | | - safe_string.h - don't assume that __FUNCTION__ is available - process.c - use new workaround from safe_string.h for the same - util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc() - gencache.c - Keep valgrind quiet by always null terminating. - clistr.c - Add copyright - srvstr.h - move srvstr_push into a .c file again, as a real function. - srvstr.c - revive, with 'safe' checked srvstr_push - loadparm.c - set a default for the display charset. Andrew Bartlett
* Comment about deprecated macro overmalloc_safe_strcpy().Martin Pool2003-03-181-0/+6
|
* Speling fixes and a little extra documentation.Martin Pool2003-03-181-6/+6
|
* Fix nmbd under -DDEVELOPER (pstrcpy on not-pstring).Andrew Bartlett2003-03-161-0/+2
| | | | | | Make a new macro to help in this situation, and add memcpy() parinoia Andrew Bartlett
* More work on my macro mess - we need function prototypes of different types,Andrew Bartlett2003-03-161-9/+12
| | | | | | and we were missing the 'char' type. Andrew Bartlett
* Fix the 'non-optomizing compiler' case...Andrew Bartlett2003-03-151-2/+2
| | | | Andrew Bartlett
* Fix the non-DEVELOPER case of my macro madness...Andrew Bartlett2003-03-151-1/+1
| | | | Andrew Bartlett
* String handling parinoia fixes.Andrew Bartlett2003-03-151-24/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables the compile-time checking of strings assable by means of sizeof(). (Original code had the configure check reversed). This is extended to all safe_strcpy() users, push_string and pull_string, as well as the cli and srv derivitives. There is an attempt to cap strings at the end of the cli buffer, and clobber_region() of the speified length (when not -1 :-). Becouse of the way they are declared, the 'overmalloc a string' users of safe_strcpy() have been changed to use overmalloc_safe_strcpy() (which skips some of the checks). This whole ball of mud worked fine, until I pulled out my 'fix' for our statcache. When jeremy fixes that, we should be able to get back to testing this stuff. This patch also includes a 'marker' of the last caller to clobber_region (ie, the function that called pstrcpy() that called clobber_region) to assist in debugging problems that may have smashed the stack. This is printed at smb_panic() time. (Original idea and patch by metze). It also removes some unsused functions, and #if 0's some others that are unused but probably should be used in the near future. For now, this patch gives us some confidence on one class of trivial parsing error in our code. Andrew Bartlett
* Use new configure test to turn on this automated test for correct stringAndrew Bartlett2003-03-051-1/+1
| | | | | | function usage. Andrew Bartlett
* the new DEVELOPER checks for string overflows have (as expected)Andrew Tridgell2003-03-011-0/+9
| | | | | | broken a lot of stuff. These two macros are meant to make life easier when fixing these bugs. I'm guessing we will see more macros like this (eg. fstrcpy_base)
* Commit my (disabled) fstring/pstring mixup detection code.Andrew Bartlett2003-01-141-0/+21
| | | | | | We need to fix some 'overmalloc' cases before it can be enabled by default. Andrew Bartlett
* Added Martin's lpq parse fixes from 2.2.Jeremy Allison2002-04-191-0/+3
| | | | Jeremy.
* bcopy must DIE ! Stop people creeping use of bcopy back into the codeJeremy Allison2002-02-261-0/+5
| | | | | (and yes I know who you are..... :-). Jeremy.
* Added some splint annotations from andreas.Tim Potter2002-02-161-0/+7
|
* Removed version number from file header.Tim Potter2002-01-301-1/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Roll back PSTRING_SANCTIFY patch; just leave non-controversial typeMartin Pool2002-01-161-5/+4
| | | | and constness changes.
* Integrate with PSTRING_SANCTIFY.Martin Pool2002-01-151-4/+4
|
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-3/+1
| | | | can't redefine them. damn.
* The big character set handling changeover!Andrew Tridgell2001-07-041-0/+7
| | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
* - added test for vasprintfAndrew Tridgell2001-04-281-5/+0
| | | | | | | | - cleaned up GNUC printf attribute macros - added enum handling in mkproto - removed non-vararg code - made slprintf and vslprintf just macros for snprintf and vsnprintf - don't need slprintf code any more
* Excise snprintf -> slprintf.Jeremy Allison2001-02-161-0/+5
| | | | | | | srv_samr.c: duplicate gid fix. srv_spoolss_nt.c: Merge of JF's work. uid.c: Fix for returning names when a PDC. Jeremy.
* Busting up of source/include/smb.h into smaller pieces which can beTim Potter2000-02-031-0/+50
| | | | #included by VFS modules without bringing in too much other junk.
* 2nd phase of head branch sync with SAMBA_2_0 - this delets all the files ↵Andrew Tridgell1999-12-131-45/+0
| | | | that were in the head branch but weren't in SAMBA_2_0
* Hived off string routines into a separate file.Tim Potter1999-07-091-0/+45