52 Commits

Author SHA1 Message Date
pancake
f8a35da205
Dont use != NULL as its implicit in C, even for bool casts ##refactor
$ find binr libr -name "*.c" -exec sed -i -e 's/ != NULL//g' {} \;
2022-03-15 19:54:04 +01:00
pancake
fb0ec6ed00
Use stdint like if there was no yesterday ##refactor
* stdint is needed to build r2, so there's no need to keep using
  those weak basic types anymore, and we can just alias them
2022-01-09 19:48:16 +01:00
Lazula
ad749a0b1a Fix static/R_API function definition formatting
* Remove spaces before parens
* Remove spaces after asterisks
2021-12-21 20:58:12 +01:00
pancake
0e3380797f Fix warnings in regerror.c 2021-05-20 00:22:50 +02:00
pancake
530c737d5d
Fix incorrect use of non-const strings and fiz zousans of warnings (#18544)
Co-authored-by: pancake <pancake@nopcode.org>
2021-04-06 12:45:19 +02:00
eagleoflqj
7b1b103f13 Fix r2 - tab crash related to regex apis 2021-01-09 12:47:47 +01:00
liumeo
965f3ed10e Use pj in dmj, dmhj & fix regex r2r ##refactor 2021-01-09 12:35:20 +01:00
pancake
ae3ff63bab Massage RRegex to fix codingstyle and a null deref. ##regexp 2021-01-08 04:42:07 +01:00
pancake
160fc95e66
Use (void) instead of () in function signatures (#17026) ##refactoring
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
pancake
fdb75d3bf9
Fix memory leak in /ad/ using r_regex api wrongly ##search (#16537)
* /ad/ in /bin/ls ate 9 extra MB that was never freed
* This is about 400 bytes for each instruction disassembled
2020-04-12 10:53:41 +02:00
the-remmer
2d143a8316 Add support for hex escaped litterals in regular expressions (#15291) ##search
Example: /e /(\x77\x30\x30\x74){2}/ searches for "w00tw00t"
2019-10-17 02:38:21 +02:00
GustavoLCR
2e61459499 Fix #14202 - Add support to '\d', '\w', etc. in regex ##search 2019-08-19 00:16:38 +02:00
dav1901
c1f30de193 Minor code cleanups free/R_FREE (#12157) 2018-11-14 21:23:20 +01:00
lzutao
b790439e28 Cast arguments to ut8 when feeding ctype.h functions ##refactor
The behavior of the `<ctype.h>` functions is undefined for negative
arguments (other than `EOF`). In such a situation, the argument should
be cast to `unsiged char` for safety.

References:
 - C Programming: A Modern Approach, 2nd Edition: page 612, chapter 23.5
2018-11-06 13:40:00 +01:00
David CARLIER
79871d4164 Fix #11671 (#11673)
Using macro for regex module too.
2018-09-27 11:16:44 -07:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Neven Sajko
d8784641ee Add parentheses in macros where needed for safety (#11290) 2018-08-30 13:16:50 +02:00
Simone Ferrini
b53c5bd319 Added NULL check in r_regex_comp func (#11313) 2018-08-30 12:59:58 +02:00
Giovanni
6fe6564b8d Fixed 8 coverity bugs (#8305)
* 1372278 Identical code for different branches
* 1372276 Dereference after null check
* 1372273 Logically dead code
DEAD CODE. i must be between 1 and 9.
* 1372272 Logically dead code
At condition 64U - slen > 64U, the value of slen must be between 1 and 63.
At condition 64U - slen > 64U, the value of slen cannot be equal to 0.
The condition 64U - slen > 64U cannot be true.
* 1372265 Dereference after null check
* 1372264 Logically dead code
* 1372262 Logically dead code
* 1372258 Logically dead code
* 1372257 Unchecked return value
2017-08-25 18:12:12 +02:00
Raúl Peñacoba
90938f9a73 Add missing free() in regcomp.c 2017-05-07 11:52:47 +02:00
alvarofe
0cdd14e422 Fix #7150 - null dereference in regcomp.c 2017-03-27 21:56:58 +02:00
Álvaro Felipe Melchor
6870bec29f Fix #6853 - get rid of asserts 2017-03-12 15:24:05 +01:00
pancake
798fea7c98 Fix #2179 - regex overflow on 32bits systems with 720MB patterns 2017-01-29 04:42:17 +01:00
pancake
0111506292 Fix STRLCPY macro from regex and fix 1 byte overflow CID 2016-12-19 03:23:49 +01:00
Anton Kochkov
df413fef42 Fix CID 1295065, 1362999 2016-12-17 01:11:54 +03:00
Sven Steinbauer
2996538700 Fix #5633 - Change x == NULL to correct syntax 2016-09-19 14:44:47 +02:00
oblique
f06e11b6f4 Fix warnings (#5078)
* Fix gcc warnings

* Fix strtoull return
2016-06-06 00:33:11 +02:00
Sven Steinbauer
547f8bbc5c Infer fixes Round 2 (#4993) 2016-05-24 22:22:15 +02:00
pancake
d9636a9738 Fix some more clang analyzer warnings and cleanup 2016-05-24 14:54:34 +02:00
pancake
522d30aea2 Fix regoff_t conflict 2016-02-21 03:45:41 +01:00
Jeffrey Crowell
4c0d56408f rm debug eprintf in rregex 2016-01-25 17:48:34 -05:00
Álvaro Felipe Melchor
b1583d5b24 Fix more issues reported by clang-analyzer 2015-11-03 22:14:00 +01:00
pancake
691e0c8c1a Fix latest COVs 2015-10-31 12:06:40 +01:00
pancake
74ec59d624 Fix workaround for /R/ 2015-10-24 02:41:43 +02:00
pancake
f3ddfbb9ec Fixes for RRegex, Use r_regex_match(), comp+exec seems buggy 2015-10-24 02:06:45 +02:00
pancake
a45981cb14 Fix int/double infinity constant issue in util/regex 2015-04-29 11:31:49 +02:00
pancake
63f0dc8e3f Implement more utf8 terminal check, handle jbe in asm.pseudo 2015-04-20 15:27:05 +02:00
Kamil Rytarowski
aadbd0f868 Fix GCC warnings: array subscript has type 'char'
Reported at NetBSD-current/amd64
GCC 4.8.4 (nb1 20141012)
2014-12-04 03:26:08 +00:00
deeso
3e412605e3 Fixed: 1205190, 1205200, 1205191, 1205199, 1205198, 1205197, 1205196, 1205195 2014-04-25 14:21:20 -05:00
Anton Kochkov
008af29003 Fix CID #972173 2014-04-25 05:40:30 +04:00
Anton Kochkov
633043ae8f Fix CID #1134677 2014-04-25 05:36:16 +04:00
Adam Pridgen
ea94ae5c2c Fix CID: 1204243, 1204247, 1204246, 1204245, 1204244 2014-04-20 23:55:50 -05:00
Anton Kochkov
b257f06a9c Fix CID #11351131 2014-04-20 03:33:59 +04:00
pancake
6656f8d0fa Some more cleanup and rmeta fixes 2014-01-23 04:00:01 +01:00
pancake
3b3bbbb916 Add more Jamroot files and move some plugs to r2-extras 2013-12-31 15:34:27 +01:00
pancake
0f2fd99986 Fix some warnings and add a specific plugins.cfg for emscripten 2013-09-15 23:57:22 +02:00
pancake
cdea34616d Fix some warnings 2013-06-09 02:55:03 +02:00
pancake
caaccaddc9 Fix some warnings 2012-12-13 18:32:26 +01:00
pancake
7b093a3ed5 * Fix all dangerous bugs reported by llvm-analyzer 2011-11-14 22:46:23 +01:00
pancake
17dfe1bcf8 * Fix some possible-use-of-uninitialized-variables 2011-10-20 16:36:00 +02:00