From e21bfd335132e005c43fb12f5fd35c4400763976 Mon Sep 17 00:00:00 2001 From: mionica Date: Thu, 30 Apr 2015 17:53:22 +0100 Subject: [PATCH] ferror() after fclose() bug fixed either a wrong value being returned, or a segfaule (depending on how bionic handles its files) --- xposed_service.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xposed_service.cpp b/xposed_service.cpp index 23ee6554a..c28cc712b 100644 --- a/xposed_service.cpp +++ b/xposed_service.cpp @@ -765,7 +765,7 @@ status_t XposedService::readFile(const String16& filename16, int32_t offset, int status_t err = ferror(f); fclose(f); if (errormsg) *errormsg = formatToString16("%s during fseek() to offset %d for %s", strerror(err), offset, filename); - return ferror(f); + return err; } // Read the file