[Forensics-changes] [yara] 320/407: Fix bug while handling negative integers
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:28:40 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.3.0
in repository yara.
commit 9d1c14acd3a0d173062ceb1a2beaf986697b1c82
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Mon Jan 5 15:26:05 2015 +0100
Fix bug while handling negative integers
---
libyara/lexer.c | 2 +-
libyara/lexer.l | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libyara/lexer.c b/libyara/lexer.c
index 8764ba9..f2afba5 100644
--- a/libyara/lexer.c
+++ b/libyara/lexer.c
@@ -1488,7 +1488,7 @@ YY_RULE_SETUP
#line 378 "lexer.l"
{
- yylval->integer = (size_t) atol(yytext);
+ yylval->integer = strtoll(yytext, NULL, 10);
if (strstr(yytext, "KB") != NULL)
{
diff --git a/libyara/lexer.l b/libyara/lexer.l
index ca9f4f1..7b9e283 100644
--- a/libyara/lexer.l
+++ b/libyara/lexer.l
@@ -377,7 +377,7 @@ u?int(8|16|32)(be)? {
-?{digit}+(MB|KB){0,1} {
- yylval->integer = (size_t) atol(yytext);
+ yylval->integer = strtoll(yytext, NULL, 10);
if (strstr(yytext, "KB") != NULL)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list