From c1504a8ffa4694779448393e5781cb182610c486 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 18 Sep 2010 20:18:39 +0000 Subject: Release 10.35.77 git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@1287 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- Makefile.version | 2 +- converter/ppm/ppmtompeg/param.c | 10 ++-------- doc/HISTORY | 8 ++++++++ other/pamx/image.h | 1 - other/pamx/send.c | 5 +++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Makefile.version b/Makefile.version index 9111b3ab..d7dfdb3e 100644 --- a/Makefile.version +++ b/Makefile.version @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 35 -NETPBM_POINT_RELEASE = 76 +NETPBM_POINT_RELEASE = 77 diff --git a/converter/ppm/ppmtompeg/param.c b/converter/ppm/ppmtompeg/param.c index 5ea69ab6..69e38a6c 100644 --- a/converter/ppm/ppmtompeg/param.c +++ b/converter/ppm/ppmtompeg/param.c @@ -283,8 +283,8 @@ GetFrameRate(const char * const p) static void -mergeInputSource(struct inputSource * const baseSourceP, - struct inputSource * const addedSourceP) { +mergeInputSource(struct inputSource * const baseSourceP, + const struct inputSource * const addedSourceP) { unsigned int i; @@ -294,12 +294,6 @@ mergeInputSource(struct inputSource * const baseSourceP, for (i = 0; i < addedSourceP->numInputFileEntries; ++i) baseSourceP->inputFileEntries[baseSourceP->numInputFileEntries++] = addedSourceP->inputFileEntries[i]; - - free(addedSourceP); - /* Note the space allocated for the *addedSourceP input file - entries themselves is still allocated, and used by - *baseSourceP. - */ } diff --git a/doc/HISTORY b/doc/HISTORY index 9dfde0f7..1f288d54 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,14 @@ Netpbm. CHANGE HISTORY -------------- +10.09.18 BJH Release 10.35.77 + + ppmtompeg: fix crash with free of unallocated memory. + + Build: don't expect snprintf() to exist. + + Build: don't use or bzero(). + 10.07.10 BJH Release 10.35.76 Pnmtopng: -libversion doesn't report level of linked libz. diff --git a/other/pamx/image.h b/other/pamx/image.h index 9c9689ac..ea597b2e 100644 --- a/other/pamx/image.h +++ b/other/pamx/image.h @@ -1,6 +1,5 @@ #ifndef IMAGE_H_INCLUDED #define IMAGE_H_INCLUDED -#include #include "pm_c_util.h" diff --git a/other/pamx/send.c b/other/pamx/send.c index 4b1268a5..5413308b 100644 --- a/other/pamx/send.c +++ b/other/pamx/send.c @@ -9,6 +9,7 @@ See COPYRIGHT file for copyright information. */ +#include #include #include @@ -131,7 +132,7 @@ itrueToRGB(Image * const imageP, colors = 1 << ddepth; - bzero(pixel_counts, 32768 * sizeof(unsigned long)); + memset(pixel_counts, 0, 32768 * sizeof(unsigned long)); pixel= imageP->data; for (y= 0; y < imageP->height; y++) { @@ -693,7 +694,7 @@ makeXImage(XImageInfo * const ximageinfoP, pm_error("Unable to allocate space for %u x %x x %u " "image", imageP->width, imageP->height, dpixlen); ximageinfoP->ximageP->data = (char*)data; - bzero(data, size); + memset(data, 0, size); ximageinfoP->ximageP->bitmap_bit_order = MSBFirst; ximageinfoP->ximageP->byte_order = MSBFirst; for (a= 0; a < dbits; ++a) { -- cgit 1.4.1