Changeset 4896 for trunk/reader-dre.c


Ignore:
Timestamp:
Apr 2, 2011, 11:26:47 PM (9 years ago)
Author:
Admin
Message:

Replace all occurences of strcpy and sprintf by their safe variants (please report in the forum if anything broke by this revision!). Prevent future usage of these functions through globals.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/reader-dre.c

    r4875 r4896  
    217217  int dre_chksum = 0;
    218218  uchar buf[32];
    219   sprintf ((char *)buf, "%i%i%08i", reader->provider - 16, major_version + 1, low_dre_id);
     219  snprintf ((char *)buf, sizeof(buf), "%i%i%08i", reader->provider - 16, major_version + 1, low_dre_id);
    220220  for (i = 0; i < 32; i++) {
    221221    if (buf[i] == 0x00)
Note: See TracChangeset for help on using the changeset viewer.