patch-gimglib_c 682 B

12345678910111213141516
  1. $OpenBSD: patch-gimglib_c,v 1.1.1.1 2013/05/13 06:57:01 jasper Exp $
  2. prev_block may be used unitialized.
  3. --- gimglib.c.orig Sun Mar 10 22:19:00 2013
  4. +++ gimglib.c Sun Mar 10 22:19:09 2013
  5. @@ -104,7 +104,7 @@ static int parse_img (struct gimg_struct *img)
  6. struct garmin_img *img_header = (struct garmin_img *)(img->base);
  7. struct subfile_struct *subfile, *subfiles, *subfiles_tail, *orphans, *orphans_tail;
  8. struct submap_struct *submap, *submaps, *submaps_tail;
  9. - unsigned int block_size, fatstart, fatend, i, prev_block;
  10. + unsigned int block_size, fatstart, fatend, i, prev_block = 0;
  11. if (img_header->xor_byte != 0) {
  12. fprintf(stderr, "XOR is not 0. Fix it first.\n");