+ : added
February 13, 2007
-! [FOD] Change file modified. -fPIC flag used for 64-bit compilation. Move operation (rather than copy) for the dist library creation, and -p flag added.
+! [FOD] David Fries suggestions. In image_to_j2k and j2k_to_image, strncpy() functions: instead of specifying the path size macro, let the compiler read the length out of the array entry.
+! [FOD] David Fries suggestions. Makefile modified. -fPIC flag used for 64-bit compilation. Move operation (rather than copy) for the dist library creation, and -p flag added.
January 31, 2007
! [FOD] Extra tokens at the end of #endif directive corrected in openjpeg.c, j2k.c and image_to_j2k.c -> no more warnings in linux compilation
infile);
return 1;
}
- strncpy(parameters->infile, infile, OPJ_PATH_LEN);
+ strncpy(parameters->infile, infile, sizeof(parameters->infile)-1);
}
break;
fprintf(stderr, "Unknown output format image %s [only *.j2k, *.jp2]!! \n", outfile);
return 1;
}
- strncpy(parameters->outfile, outfile, OPJ_PATH_LEN);
+ strncpy(parameters->outfile, outfile, sizeof(parameters->outfile)-1);
}
break;
case 'x': /* creation of index file */
{
char *index = optarg;
- strncpy(parameters->index, index, OPJ_PATH_LEN);
+ strncpy(parameters->index, index, sizeof(parameters->index)-1);
parameters->index_on = 1;
}
break;
/* we need to enable indexing */
if (!parameters->index_on) {
- strncpy(parameters->index, JPWL_PRIVATEINDEX_NAME, OPJ_PATH_LEN);
+ strncpy(parameters->index, JPWL_PRIVATEINDEX_NAME, sizeof(parameters->index)-1);
parameters->index_on = 1;
}
infile);
return 1;
}
- strncpy(parameters->infile, infile, OPJ_PATH_LEN);
+ strncpy(parameters->infile, infile, sizeof(parameters->infile)-1);
}
break;
fprintf(stderr, "Unknown output format image %s [only *.pnm, *.pgm, *.ppm, *.pgx or *.bmp]!! \n", outfile);
return 1;
}
- strncpy(parameters->outfile, outfile, OPJ_PATH_LEN);
+ strncpy(parameters->outfile, outfile, sizeof(parameters->outfile)-1);
}
break;