summaryrefslogtreecommitdiffstats
path: root/source/web/cgi.c
Commit message (Collapse)AuthorAgeFilesLines
* r17918: * NULL deref fixesGerald Carter2006-08-291-2/+3
| | | | | * time fixes for tortore * nmbd crash fix
* r16438: sync up to r16433Gerald Carter2006-06-211-0/+15
|
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2006-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy.
* r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter2006-02-201-3/+3
| | | | macro which sets the freed pointer to NULL.
* r13316: Let the carnage begin....Gerald Carter2006-02-031-5/+5
| | | | Sync with trunk as off r13315
* r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the tortureJeremy Allison2005-07-081-0/+4
| | | | | | | | | tests on this as it's very late NY time (just wanted to get this work into the tree). I'll test this over the weekend.... Jerry - in looking at the difference between the two trees there seem to be some printing/ntprinting.c and registry changes we might want to examine to try keep in sync. Jeremy.
* r4577: Fix from William Jojo <jojowil@hvcc.edu> for AIX 5.3 compile.Jeremy Allison2005-01-061-2/+2
| | | | Jeremy.
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2004-12-071-10/+10
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r2835: Since we always have -I. and -I$(srcdir) in CFLAGS, we can get rid of Tim Potter2004-10-071-1/+1
| | | | | '..' from all #include preprocessor commands. This fixes bugzilla #1880 where OpenVMS gets confused about the '.' characters.
* r2771: Second (and last) part of Swat-i18n-Patch from Björn JackeGünther Deschner2004-10-011-6/+6
| | | | | | | | | | | | | <bjacke@sernet.de> "Do not use display charset for swat output. In HTML we do not care about the "locale charmap" because HTML code is UTF-8 only now. Additionally take care that we convert files from statuspage from unix charset to UTF-8. Thus we have correct HTML output under all circumstances. We now also convert the share names correctly from unix encoding to web encoding and vice vera. " Guenther
* r1833: patch from James Peach to get swat to look for index.html by default ↵Gerald Carter2004-08-161-4/+24
| | | | when given a trailing directory/
* r2: import HEAD into svn+ssh://svn.samba.org/home/svn/samba/trunkCVS Import User2004-04-041-0/+626
metze