Support 'q' length modifier in scanf/printf interceptors
llvm-svn: 202268
This commit is contained in:
parent
4b1a7fe33a
commit
14e061d7cc
|
@ -116,6 +116,8 @@ static int format_get_value_size(char convSpecifier,
|
|||
return lengthModifier[1] == 'h' ? sizeof(char) : sizeof(short);
|
||||
case 'l':
|
||||
return lengthModifier[1] == 'l' ? sizeof(long long) : sizeof(long);
|
||||
case 'q':
|
||||
return sizeof(long long);
|
||||
case 'L':
|
||||
return sizeof(long long);
|
||||
case 'j':
|
||||
|
|
|
@ -111,6 +111,7 @@ TEST(SanitizerCommonInterceptors, Scanf) {
|
|||
testScanf("ab%u%dc", 2, I, I);
|
||||
testScanf("%ld", 1, L);
|
||||
testScanf("%llu", 1, LL);
|
||||
testScanf("%qd", 1, LL);
|
||||
testScanf("a %hd%hhx", 2, S, C);
|
||||
testScanf("%c", 1, C);
|
||||
|
||||
|
|
Loading…
Reference in New Issue