|
|
a6c909 |
From 831f57740c054c4ee129e8de96c93c706c620382 Mon Sep 17 00:00:00 2001
|
|
|
a6c909 |
From: Martin Kutlak <mkutlak@redhat.com>
|
|
|
a6c909 |
Date: Mon, 20 Aug 2018 14:38:31 +0200
|
|
|
a6c909 |
Subject: [PATCH] coverity: Change data type for bug_id variable #def[44,43]
|
|
|
a6c909 |
|
|
|
a6c909 |
If bug_id is an integer, it makes condition 'bug_id > INT_MAX' always evaluate False.
|
|
|
a6c909 |
|
|
|
a6c909 |
It is changed to unsigned long because of strtoul (converts strings to unsigned long).
|
|
|
a6c909 |
|
|
|
a6c909 |
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
|
|
a6c909 |
---
|
|
|
a6c909 |
src/plugins/reporter-bugzilla.c | 2 +-
|
|
|
a6c909 |
src/plugins/reporter-mantisbt.c | 2 +-
|
|
|
a6c909 |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
a6c909 |
|
|
|
a6c909 |
diff --git a/src/plugins/reporter-bugzilla.c b/src/plugins/reporter-bugzilla.c
|
|
|
a6c909 |
index 2922e8ac..d4d03f8e 100644
|
|
|
a6c909 |
--- a/src/plugins/reporter-bugzilla.c
|
|
|
a6c909 |
+++ b/src/plugins/reporter-bugzilla.c
|
|
|
a6c909 |
@@ -628,7 +628,7 @@ int main(int argc, char **argv)
|
|
|
a6c909 |
login(client, &rhbz);
|
|
|
a6c909 |
|
|
|
a6c909 |
|
|
|
a6c909 |
- int bug_id = 0;
|
|
|
a6c909 |
+ unsigned long bug_id = 0;
|
|
|
a6c909 |
|
|
|
a6c909 |
/* If REMOTE_RESULT contains "DUPLICATE 12345", we consider it a dup of 12345
|
|
|
a6c909 |
* and won't search on bz server.
|
|
|
a6c909 |
diff --git a/src/plugins/reporter-mantisbt.c b/src/plugins/reporter-mantisbt.c
|
|
|
a6c909 |
index c2b0d0b4..67597d52 100644
|
|
|
a6c909 |
--- a/src/plugins/reporter-mantisbt.c
|
|
|
a6c909 |
+++ b/src/plugins/reporter-mantisbt.c
|
|
|
a6c909 |
@@ -463,7 +463,7 @@ int main(int argc, char **argv)
|
|
|
a6c909 |
exit(0);
|
|
|
a6c909 |
}
|
|
|
a6c909 |
|
|
|
a6c909 |
- int bug_id = 0;
|
|
|
a6c909 |
+ unsigned long bug_id = 0;
|
|
|
a6c909 |
|
|
|
a6c909 |
/* If REMOTE_RESULT contains "DUPLICATE 12345", we consider it a dup of 12345
|
|
|
a6c909 |
* and won't search on MantisBT server.
|
|
|
a6c909 |
--
|
|
|
a6c909 |
2.17.1
|
|
|
a6c909 |
|