* Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe
* Copyright (c) 2005, Herve Drolon, FreeImage Team
* Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium
- * Copyright (c) 2006, M�nica D�ez Garc�a, Image Processing Laboratory, University of Valladolid, Spain
+ * Copyright (c) 2006, Mónica Díez García, Image Processing Laboratory, University of Valladolid, Spain
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
memset(pgxfiles, 0, MAX_SLICES * MAX_PATH * sizeof(char));
memset(&cmptparm, 0, sizeof(opj_volume_cmptparm_t));
- /* Separaci�n del caso de un �nico slice frente al de muchos */
+ /* Separación del caso de un único slice frente al de muchos */
if ((tmp = strrchr(relpath, '-')) == NULL) {
/*fprintf(stdout,"[INFO] A volume of only one slice....\n");*/
sliceno = 1;
fprintf(stdout, "[INFO] Loading %s \n", pgxfiles[pos]);
fseek(f, 0, SEEK_SET);
- fscanf(f, "PG%[ \t]%c%c%[ \t+-]%d%[ \t]%d%[ \t]%d", temp, &endian1, &endian2,
- signtmp, &prec, temp, &w, temp, &h);
+ fscanf(f, "PG%31[ \t]%c%c%31[ \t+-]%d%31[ \t]%d%31[ \t]%d", temp, &endian1,
+ &endian2, signtmp, &prec, temp, &w, temp, &h);
i = 0;
sign = '+';
cmptparm.bigendian = 0;
} else {
fprintf(stdout, "[ERROR] Bad pgx header, please check input file\n");
+ fclose(f);
return NULL;
}
fclose(fdest);
- sprintf(name, "%s.img", outfile);
+ snprintf(name, sizeof(name), "%s.img", outfile);
fimgdest = fopen(name, "w");
if (!fimgdest) {
fprintf(stdout, "[ERROR] Failed to open %s for writing\n", name);