Changeset 284


Ignore:
Timestamp:
01/05/15 20:39:39 (10 years ago)
Author:
Maciej Komosinski
Message:

Wrong sscanf size in 64-bit caused stack damage (in "0x....." conversion)

Location:
cpp/frams
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/param/param.h

    r278 r284  
    3636typedef int32_t paInt;
    3737#define PA_INT_SCANF "%d"
     38#define PA_INT_SCANF_X "%x"
    3839
    3940// the result of param::set() is a combination of bits:
  • cpp/frams/util/extvalue.cpp

    r273 r284  
    614614        {
    615615        paInt val;
    616         sscanf(s+2,"%lx",&val);
     616        sscanf(s+2,PA_INT_SCANF_X,&val);
    617617        return val;
    618618        }
     
    631631        {
    632632        paInt val;
    633         sscanf(s+2,"%lx",&val);
     633        sscanf(s+2,PA_INT_SCANF_X,&val);
    634634        return val;
    635635        }
Note: See TracChangeset for help on using the changeset viewer.