Ignore:
Timestamp:
Apr 28, 2011, 1:07:43 AM (10 years ago)
Author:
Sam Hocevar
Message:

core: fix a few security issues caused by unchecked string operations,
reported in ticket #25.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/dev.cpp

    r533 r545  
    867867    {
    868868      i++;
    869       strcpy(level_file,argv[i]);
     869      strncpy(level_file, argv[i], sizeof(level_file) - 1);
     870      level_file[sizeof(level_file) - 1] = '\0';
    870871    } else if (!strcmp(argv[i],"-2"))
    871872      start_doubled=1;
Note: See TracChangeset for help on using the changeset viewer.