diff options
author | Maxim Siniavine <siniavine@google.com> | 2014-02-14 00:48:53 +0100 |
---|---|---|
committer | Maxim Siniavine <siniavine@google.com> | 2014-02-14 00:53:38 +0100 |
commit | e7b288824589b2828d83e1d47f6f12b0bd0fb353 (patch) | |
tree | 67a7d0814abc987c9763ce2d162d742c57c2810d | |
parent | am 2739ed96: am a5d105e2: Merge "recovery: fix building with pointer-to-int errors turned on" (diff) | |
download | android_bootable_recovery-e7b288824589b2828d83e1d47f6f12b0bd0fb353.tar android_bootable_recovery-e7b288824589b2828d83e1d47f6f12b0bd0fb353.tar.gz android_bootable_recovery-e7b288824589b2828d83e1d47f6f12b0bd0fb353.tar.bz2 android_bootable_recovery-e7b288824589b2828d83e1d47f6f12b0bd0fb353.tar.lz android_bootable_recovery-e7b288824589b2828d83e1d47f6f12b0bd0fb353.tar.xz android_bootable_recovery-e7b288824589b2828d83e1d47f6f12b0bd0fb353.tar.zst android_bootable_recovery-e7b288824589b2828d83e1d47f6f12b0bd0fb353.zip |
-rw-r--r-- | uncrypt/uncrypt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/uncrypt/uncrypt.c b/uncrypt/uncrypt.c index 1f0f59dba..7c2d99477 100644 --- a/uncrypt/uncrypt.c +++ b/uncrypt/uncrypt.c @@ -149,9 +149,14 @@ char* parse_recovery_command_file() int count = 0; char temp[1024]; - FILE* fo = fopen(RECOVERY_COMMAND_FILE_TMP, "w"); + FILE* f = fopen(RECOVERY_COMMAND_FILE, "r"); + if (f == NULL) { + return NULL; + } + FILE* fo = fopen(RECOVERY_COMMAND_FILE_TMP, "w"); + while (fgets(temp, sizeof(temp), f)) { printf("read: %s", temp); if (strncmp(temp, "--update_package=", strlen("--update_package=")) == 0) { |