mirror of https://github.com/mirror/busybox.git
docproc: avoid segfault during file closing
In the function find_export_symbols, since the fopen file does not exit when it fails, there is a dereference problem in fclose(fp), which will cause a segmentation fault. Signed-off-by: Yan Zhu <zhuyan2015@foxmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>master
parent
e1a6874106
commit
681e4f5d92
|
@ -180,6 +180,7 @@ void find_export_symbols(char * filename)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "docproc: ");
|
fprintf(stderr, "docproc: ");
|
||||||
perror(real_filename);
|
perror(real_filename);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
while (fgets(line, MAXLINESZ, fp)) {
|
while (fgets(line, MAXLINESZ, fp)) {
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
|
Loading…
Reference in New Issue