mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-06 11:41:34 +00:00
setup_client_stack: use have_exename to consistently guard uses
of VG_(args_the_exename), thereby avoiding a potential segfault. Spotted by IBM's BEAM checker. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11724
This commit is contained in:
parent
1ccdd881a6
commit
29c20eaeb0
@ -456,7 +456,7 @@ Addr setup_client_stack( void* init_sp,
|
||||
stringsize += VG_(strlen)(cauxv->u.a_ptr) + 1;
|
||||
else if (cauxv->a_type == AT_RANDOM)
|
||||
stringsize += 16;
|
||||
else if (cauxv->a_type == AT_EXECFN)
|
||||
else if (cauxv->a_type == AT_EXECFN && have_exename)
|
||||
stringsize += VG_(strlen)(VG_(args_the_exename)) + 1;
|
||||
auxsize += sizeof(*cauxv);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user