Print this page
code review
*** 34,44 ****
#define ELF_TARGET_AMD64
#include <stdio.h>
#include <string.h>
#include <debug.h>
- #include <alloca.h>
#include "msg.h"
#include "_libld.h"
/*
* AVL tree comparator function:
--- 34,43 ----
*** 901,917 ****
switch (bound) {
case SDAUX_ID_SECBOUND_START:
nsz = snprintf(symn, sizeof (symn), "%s%s",
MSG_ORIG(MSG_SYM_SECBOUND_START), osp->os_name + 1);
! if (nsz > sizeof (symn))
return;
break;
case SDAUX_ID_SECBOUND_STOP:
nsz = snprintf(symn, sizeof (symn), "%s%s",
MSG_ORIG(MSG_SYM_SECBOUND_STOP), osp->os_name + 1);
! if (nsz > sizeof (symn))
return;
break;
default:
assert(0);
}
--- 900,916 ----
switch (bound) {
case SDAUX_ID_SECBOUND_START:
nsz = snprintf(symn, sizeof (symn), "%s%s",
MSG_ORIG(MSG_SYM_SECBOUND_START), osp->os_name + 1);
! if (nsz >= sizeof (symn))
return;
break;
case SDAUX_ID_SECBOUND_STOP:
nsz = snprintf(symn, sizeof (symn), "%s%s",
MSG_ORIG(MSG_SYM_SECBOUND_STOP), osp->os_name + 1);
! if (nsz >= sizeof (symn))
return;
break;
default:
assert(0);
}
*** 959,969 ****
/*
* For each section in the output file, look for symbols named for the
* __start/__stop patterns. If references exist, flesh the symbols to
* be defined.
*
! * the symbols are given values at the same time as the other special
* symbols.
*/
for (APLIST_TRAVERSE(ofl->ofl_segs, idx1, sgp)) {
Os_desc *osp;
Aliste idx2;
--- 958,968 ----
/*
* For each section in the output file, look for symbols named for the
* __start/__stop patterns. If references exist, flesh the symbols to
* be defined.
*
! * The symbols are given values at the same time as the other special
* symbols.
*/
for (APLIST_TRAVERSE(ofl->ofl_segs, idx1, sgp)) {
Os_desc *osp;
Aliste idx2;