Blame SOURCES/0209-lib-problem-report-API-check-fseek-return-code.patch
|
|
2c83a8 |
From a7d83c252e978dfdd42de5bdc01e292167501b51 Mon Sep 17 00:00:00 2001
|
|
|
2c83a8 |
From: Matej Habrnal <mhabrnal@redhat.com>
|
|
|
2c83a8 |
Date: Fri, 22 Jan 2016 13:17:13 +0100
|
|
|
2c83a8 |
Subject: [PATCH] lib: problem report API check fseek return code
|
|
|
2c83a8 |
|
|
|
2c83a8 |
Related to #1261358
|
|
|
2c83a8 |
|
|
|
2c83a8 |
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
|
|
2c83a8 |
---
|
|
|
2c83a8 |
src/lib/problem_report.c | 3 ++-
|
|
|
2c83a8 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
2c83a8 |
|
|
|
2c83a8 |
diff --git a/src/lib/problem_report.c b/src/lib/problem_report.c
|
|
|
2c83a8 |
index 6598c15..2bf5530 100644
|
|
|
2c83a8 |
--- a/src/lib/problem_report.c
|
|
|
2c83a8 |
+++ b/src/lib/problem_report.c
|
|
|
2c83a8 |
@@ -344,7 +344,8 @@ format_percented_string(const char *str, problem_data_t *pd, FILE *result)
|
|
|
2c83a8 |
opt_depth--;
|
|
|
2c83a8 |
if (!okay[opt_depth])
|
|
|
2c83a8 |
{
|
|
|
2c83a8 |
- fseek(result, old_pos[opt_depth], SEEK_SET);
|
|
|
2c83a8 |
+ if (fseek(result, old_pos[opt_depth], SEEK_SET) < 0)
|
|
|
2c83a8 |
+ perror_msg_and_die("fseek");
|
|
|
2c83a8 |
len = old_pos[opt_depth];
|
|
|
2c83a8 |
}
|
|
|
2c83a8 |
str += 2;
|
|
|
2c83a8 |
--
|
|
|
2c83a8 |
1.8.3.1
|
|
|
2c83a8 |
|