1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
Description: Buffer size and string formatting correction
Author: Josenilson Ferreira da Silva <nilsonfsilva@hotmail.com>
Forwarded: not-needed
Last-Update: 2024-08-04
Index: xli/pcd.c
===================================================================
--- xli.orig/pcd.c
+++ xli/pcd.c
@@ -786,7 +786,7 @@ static huff *
/* Allocate double space to allow for branch nodes */
hufftab = (huff *) lmalloc(sizeof(huff) * (1 << 12));
- bfill(hufftab, sizeof(huff) * (1 << 12), 0xff);
+ bfill((char *)hufftab, sizeof(huff) * (1 << 12), 0xff);
for (i = 0; i < num; i++) {
unsigned int length, codeword, value;
Index: xli/png.c
===================================================================
--- xli.orig/png.c
+++ xli/png.c
@@ -41,7 +41,7 @@ static void describe_png(char *name, png
ct = png_get_color_type(png, info);
bd = png_get_bit_depth(png, info);
- printf("%s is a%s %lux%lu %d bit deep %s PNG image",
+ printf("%s is a%s %ux%u %d bit deep %s PNG image",
name,
png_get_interlace_type(png, info) ? "n interlaced" : "",
png_get_image_width(png, info),
Index: xli/xlito.c
===================================================================
--- xli.orig/xlito.c
+++ xli/xlito.c
@@ -181,7 +181,7 @@ int main(int argc, char **argv)
{
char padding[PADSIZE];
int i;
- char tt[6];
+ char tt[12];
int tlen;
long fsize;
@@ -207,7 +207,7 @@ int main(int argc, char **argv)
exit(-1);
}
}
-
+
sprintf(tt+1,"%04d",tlen);
tt[0] = tt[ 5] = '"';
|