From f473943d7301848fa75abfc4254916e4eb0151b2 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 19 Mar 2002 18:17:08 +0000 Subject: Prevent uninitialized use --- ldso/ldso/dl-elf.c | 2 +- ldso/ldso/readelflib1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ldso') diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c index 37d622dd8..d565b9290 100644 --- a/ldso/ldso/dl-elf.c +++ b/ldso/ldso/dl-elf.c @@ -164,13 +164,13 @@ struct elf_resolve *_dl_load_shared_library(int secure, char *libname; _dl_internal_error_number = 0; + pnt = libname = full_libname; /* quick hack to ensure mylibname buffer doesn't overflow. don't allow full_libname or any directory to be longer than 1024. */ if (_dl_strlen(full_libname) > 1024) goto goof; - pnt = libname = full_libname; while (*pnt) { if (*pnt == '/') libname = pnt + 1; diff --git a/ldso/ldso/readelflib1.c b/ldso/ldso/readelflib1.c index 37d622dd8..d565b9290 100644 --- a/ldso/ldso/readelflib1.c +++ b/ldso/ldso/readelflib1.c @@ -164,13 +164,13 @@ struct elf_resolve *_dl_load_shared_library(int secure, char *libname; _dl_internal_error_number = 0; + pnt = libname = full_libname; /* quick hack to ensure mylibname buffer doesn't overflow. don't allow full_libname or any directory to be longer than 1024. */ if (_dl_strlen(full_libname) > 1024) goto goof; - pnt = libname = full_libname; while (*pnt) { if (*pnt == '/') libname = pnt + 1; -- cgit v1.2.3