Module Name:    othersrc
Committed By:   agc
Date:           Thu Feb 16 07:36:55 UTC 2012

Modified Files:
        othersrc/external/bsd/circa/dist: circa.c

Log Message:
make sure we initialise the circa structures when decoding a file, and no
header is present.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 othersrc/external/bsd/circa/dist/circa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/circa/dist/circa.c
diff -u othersrc/external/bsd/circa/dist/circa.c:1.6 othersrc/external/bsd/circa/dist/circa.c:1.7
--- othersrc/external/bsd/circa/dist/circa.c:1.6	Thu Feb 16 04:05:12 2012
+++ othersrc/external/bsd/circa/dist/circa.c	Thu Feb 16 07:36:54 2012
@@ -352,7 +352,10 @@ circa_file(circa_t *circa, size_t sector
 				return 0;
 			}
 		} else {
-			readsize = sectorsize;
+			if (!circa_init(circa, readsize = sectorsize)) {
+				(void) fprintf(stderr, "bad sectorsize %zu\n", sectorsize);
+				return 0;
+			}
 		}
 		if ((buf = calloc(1, sectorsize)) == NULL ||
 		    (out = calloc(1, sectorsize)) == NULL) {

Reply via email to