summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2014-08-04 23:53:30 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2014-08-10 16:07:18 +0200
commitd357cc7df07580468365d4adfda556cf55168a15 (patch)
treeaa4719cecd1bb1aaddc4d408c918175f40fcbae8
parent8f842670864f64281c2613cb228cbfe074349706 (diff)
downloadmeta-openembedded-d357cc7df07580468365d4adfda556cf55168a15.tar.gz
kexec_tools_klibc_2.0.2: update x86_vfscanf.patch
The POSIX standard http://pubs.opengroup.org/onlinepubs/009695399/functions/fgets.html states: If the stream is at end-of-file ... fgets() shall return a null pointer... If a read error occurs ... fgets() shall return a null pointer... Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch
index 14f4d2ada..cad695154 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc-2.0.2/x86_vfscanf.patch
@@ -16,7 +16,7 @@
16- retno = vfscanf(fp, scanf_line, argptr); 16- retno = vfscanf(fp, scanf_line, argptr);
17+ 17+
18+ line = xmalloc(sizeof(line) * line_size); 18+ line = xmalloc(sizeof(line) * line_size);
19+ while(fgets(line, sizeof(line), fp) != 0 ) { 19+ while(fgets(line, sizeof(line), fp) != NULL ) {
20+ line_size += MAX_LINE; 20+ line_size += MAX_LINE;
21+ line = xrealloc(line,line_size); 21+ line = xrealloc(line,line_size);
22+ } 22+ }