Contents of /trunk/kdebindings4/patches/kdebindings4-4.5.1-smokegen-segfaults.patch
Parent Directory | Revision Log
Revision 1170 -
(show annotations)
(download)
Mon Oct 11 19:08:39 2010 UTC (13 years, 11 months ago) by niro
File size: 1865 byte(s)
Mon Oct 11 19:08:39 2010 UTC (13 years, 11 months ago) by niro
File size: 1865 byte(s)
serveral build fixes
1 | diff -ur kdebindings-4.5.2/generator/parser/rpp/pp-macro-expander.cpp kdebindings-4.5.2-generator-invalid-reads/generator/parser/rpp/pp-macro-expander.cpp |
2 | --- kdebindings-4.5.2/generator/parser/rpp/pp-macro-expander.cpp 2009-12-31 14:35:20.000000000 +0100 |
3 | +++ kdebindings-4.5.2-generator-invalid-reads/generator/parser/rpp/pp-macro-expander.cpp 2010-10-07 17:10:57.000000000 +0200 |
4 | @@ -268,10 +268,10 @@ |
5 | output << '\"'; |
6 | |
7 | while (!is.atEnd()) { |
8 | - if (input == '"') { |
9 | + if (is == '"') { |
10 | output << '\\' << is; |
11 | |
12 | - } else if (input == '\n') { |
13 | + } else if (is == '\n') { |
14 | output << '"' << is << '"'; |
15 | |
16 | } else { |
17 | @@ -338,7 +338,7 @@ |
18 | |
19 | skip_blanks(input, devnull()); |
20 | //Omit paste tokens behind empty used actuals, else we will merge with the previous text |
21 | - if(input == '#' && (++input) == '#') { |
22 | + if(!input.atEnd() && input == '#' && !(++input).atEnd() && input == '#') { |
23 | ++input; |
24 | //We have skipped a paste token |
25 | }else{ |
26 | diff -ur kdebindings-4.5.2/generator/type_compiler.cpp kdebindings-4.5.2-generator-invalid-reads/generator/type_compiler.cpp |
27 | --- kdebindings-4.5.2/generator/type_compiler.cpp 2010-04-28 10:00:56.000000000 +0200 |
28 | +++ kdebindings-4.5.2-generator-invalid-reads/generator/type_compiler.cpp 2010-10-07 17:11:33.000000000 +0200 |
29 | @@ -182,7 +182,7 @@ |
30 | TypeCompiler tc(m_session, m_visitor); |
31 | tc.run(node->type_specifier, node->declarator); |
32 | NameCompiler name_cc(m_session, m_visitor); |
33 | - if (tc.type().isFunctionPointer()) |
34 | + if (tc.type().isFunctionPointer() && node->declarator && node->declarator->sub_declarator) |
35 | name_cc.run(node->declarator->sub_declarator->id); |
36 | else if (node->declarator) |
37 | name_cc.run(node->declarator->id); |