INN commit: branches/2.5 (CONTRIBUTORS storage/timecaf/caf.c)
INN Commit
rra at isc.org
Tue Jun 25 17:14:34 UTC 2013
Date: Tuesday, June 25, 2013 @ 10:14:34
Author: iulius
Revision: 9493
fix segfault during dereferencing
Remove a useless unlink().
Thanks to David Binderman for having reported the issue.
Modified:
branches/2.5/CONTRIBUTORS
branches/2.5/storage/timecaf/caf.c
-----------------------+
CONTRIBUTORS | 2 +-
storage/timecaf/caf.c | 21 +++++++++++----------
2 files changed, 12 insertions(+), 11 deletions(-)
Modified: CONTRIBUTORS
===================================================================
--- CONTRIBUTORS 2013-06-25 17:13:31 UTC (rev 9492)
+++ CONTRIBUTORS 2013-06-25 17:14:34 UTC (rev 9493)
@@ -275,4 +275,4 @@
Lars Magne Ingebrigtsen, Sam Varshavchik, Matthew Vernon, Ian Jackson,
Edmund H. Ramm, Raphael Barrois, Bo Lindbergh, Matthias Meyser,
Dennis Preiser, Paolo Amoroso, Dennis Davis, River Tarnell, Jochen Schmitt,
-Tim Fardell, Remco Rijnders
+Tim Fardell, Remco Rijnders, David Binderman
Modified: storage/timecaf/caf.c
===================================================================
--- storage/timecaf/caf.c 2013-06-25 17:13:31 UTC (rev 9492)
+++ storage/timecaf/caf.c 2013-06-25 17:14:34 UTC (rev 9493)
@@ -1559,15 +1559,14 @@
** this next fseeko might actually fail, because we have buffered
** stuff that might fail on write.
*/
- if (fseeko(infile, sizeof(CAFHEADER) + head.FreeZoneTabSize,
- SEEK_SET) < 0) {
- perror(path);
- free(tocarray);
- free(newpath);
- fclose(infile);
- unlink(newpath);
- return -1;
- }
+ if (fseeko(infile, sizeof(CAFHEADER) + head.FreeZoneTabSize,
+ SEEK_SET) < 0) {
+ perror(path);
+ free(tocarray);
+ free(newpath);
+ fclose(infile);
+ return -1;
+ }
if (fwrite(tocarray, sizeof(CAFTOCENT), head.High - newlow + 1, infile) < head.High - newlow + 1
|| fflush(infile) < 0) {
CAFError(CAF_ERR_IO);
@@ -1682,7 +1681,9 @@
/* initialize blocksize, zeroes buffer. */
blocksize = newhead.BlockSize;
- if (blocksize == 0) blocksize=CAF_DEFAULT_BLOCKSIZE;
+ if (blocksize == 0) {
+ blocksize=CAF_DEFAULT_BLOCKSIZE;
+ }
zerobuff = xcalloc(blocksize, 1);
More information about the inn-committers
mailing list