IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27056


Ignore:
Timestamp:
Feb 24, 2010, 1:46:17 PM (16 years ago)
Author:
Paul Price
Message:

Check return value of fprintf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psMetadataConfig.c

    r23859 r27056  
    16491649        return false;
    16501650    }
    1651     fprintf(file, "%s", fileString);
     1651    if (fprintf(file, "%s", fileString) != strlen(fileString)) {
     1652        psError(PS_ERR_IO, true, "Failed to write contents of configuration file %s", filename);
     1653        psFree(fileString);
     1654        fclose(file);
     1655        return false;
     1656    }
    16521657    psFree(fileString);
    16531658    if (fclose(file) == EOF) {
Note: See TracChangeset for help on using the changeset viewer.