[xiph-commits] r3860 - liboggz/trunk/src/tools
conrad at svn.annodex.net
conrad at svn.annodex.net
Sun Feb 22 20:08:47 PST 2009
Author: conrad
Date: 2009-02-22 20:08:47 -0800 (Sun, 22 Feb 2009)
New Revision: 3860
Modified:
liboggz/trunk/src/tools/oggz-scan.c
Log:
oggz-scan: handle out-of-memory
Modified: liboggz/trunk/src/tools/oggz-scan.c
===================================================================
--- liboggz/trunk/src/tools/oggz-scan.c 2009-02-23 03:58:27 UTC (rev 3859)
+++ liboggz/trunk/src/tools/oggz-scan.c 2009-02-23 04:08:47 UTC (rev 3860)
@@ -332,6 +332,11 @@
/* init osdata */
osdata = malloc (sizeof (OSData));
+ if (osdata == NULL) {
+ fprintf (stderr, "%s: Out of memory\n", progname);
+ exit (1);
+ }
+
memset (osdata, 0, sizeof (OSData));
osdata->read_packet = read_packet;
if (scan_keyframes) osdata->keyframes = 1;
More information about the commits
mailing list