fseek(fp_usr, (off_t)0, SEEK_END);
nreg = ftell(fp_usr);
+ if (nreg<0) {
+ printf("SARG: Cannot get the size of file %s",pwdfile);
+ exit(1);
+ }
nreg = nreg+5000;
fseek(fp_usr, (off_t)0, SEEK_SET);
}
fseek(fp_ex, (off_t)0, SEEK_END);
- nreg = ftell(fp_ex)+11;
+ nreg = ftell(fp_ex);
+ if (nreg<0) {
+ printf("SARG: Cannot get the size of file %s",hexfile);
+ exit(1);
+ }
+ nreg += 11;
fseek(fp_ex, (off_t)0, SEEK_SET);
if((excludefile=(char *) malloc(nreg))==NULL){
}
fseek(fp_ex, (off_t)0, SEEK_END);
- nreg = ftell(fp_ex)+11;
+ nreg = ftell(fp_ex);
+ if (nreg<0) {
+ printf("SARG: Cannot get the size of file %s",uexfile);
+ exit(1);
+ }
+ nreg += 11;
fseek(fp_ex, (off_t)0, SEEK_SET);
if((excludeuser=(char *) malloc(nreg))==NULL){
exit(1);
}
fseek(fp_usr, 0, SEEK_END);
- nreg = ftell(fp_usr)+100;
+ nreg = ftell(fp_usr);
+ if (nreg<0) {
+ printf("SARG: Cannot get the size of file %s",UserTabFile);
+ exit(1);
+ }
+ nreg += 100;
fseek(fp_usr, 0, SEEK_SET);
if((userfile=(char *) malloc(nreg))==NULL){
fprintf(stderr, "SARG ERROR: %s",text[87]);