IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 25, 2015, 2:09:11 PM (11 years ago)
Author:
eugene
Message:

replace sprintf with snprintf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150616/Ohana/src/libdvo/src/dvo_image.c

    r38441 r38545  
    231231int dvo_image_createID (Header *header) {
    232232 
    233   char dbID[33];
     233  char dbID[64];
    234234
    235235  if (!header->buffer) return FALSE;
     
    259259  int i;
    260260  for (i = 0; i < 32; i++) {
    261     sprintf (&dbID[i], "%1x", (int)(16.0*drand48()));
     261    myAssert (snprintf (&dbID[i], 2, "%1x", (int)(16.0*drand48())) < 2, "overflow");
    262262  }
    263263
Note: See TracChangeset for help on using the changeset viewer.