Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/ia64/stand/common reorder to avoid null deref befor...
details: https://anonhg.NetBSD.org/src/rev/6c4d2470fd10
branches: trunk
changeset: 356810:6c4d2470fd10
user: maya <maya%NetBSD.org@localhost>
date: Sun Oct 15 01:28:32 2017 +0000
description:
reorder to avoid null deref before null test
diffstat:
sys/arch/ia64/stand/common/load_elf64.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r b23c994a5722 -r 6c4d2470fd10 sys/arch/ia64/stand/common/load_elf64.c
--- a/sys/arch/ia64/stand/common/load_elf64.c Sat Oct 14 21:21:51 2017 +0000
+++ b/sys/arch/ia64/stand/common/load_elf64.c Sun Oct 15 01:28:32 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: load_elf64.c,v 1.3 2016/08/15 08:24:05 maxv Exp $ */
+/* $NetBSD: load_elf64.c,v 1.4 2017/10/15 01:28:32 maya Exp $ */
/*-
* Copyright (c) 1998 Michael Smith <msmith%freebsd.org@localhost>
@@ -62,7 +62,6 @@
return(EFTYPE);
fp = file_alloc();
- marks = fp->marks;
if (fp == NULL) {
printf("elf64_loadfile: cannot allocate module info\n");
@@ -70,6 +69,7 @@
goto out;
}
+ marks = fp->marks;
fp->f_name = strdup(filename);
fp->f_type = strdup(ELF64_KERNELTYPE);
Home |
Main Index |
Thread Index |
Old Index