#include "defs.h"
#include "nsig.h"
+#include "xstring.h"
/* The libc headers do not define this constant since it should only be
used by the implementation. So we define it here. */
return signalent[s];
#ifdef ASM_SIGRTMAX
if (s >= ASM_SIGRTMIN && s <= (unsigned int) ASM_SIGRTMAX) {
- sprintf(buf, "SIGRT_%u", s - ASM_SIGRTMIN);
+ xsprintf(buf, "SIGRT_%u", s - ASM_SIGRTMIN);
return buf;
}
#endif
}
- sprintf(buf, "%d", sig);
+ xsprintf(buf, "%d", sig);
return buf;
}
}
#ifdef ASM_SIGRTMAX
else if (i >= ASM_SIGRTMIN && i <= ASM_SIGRTMAX) {
- s += sprintf(s, "RT_%u", i - ASM_SIGRTMIN);
+ s += xsnprintf(s, sizeof(outstr) - (s - outstr),
+ "RT_%u", i - ASM_SIGRTMIN);
}
#endif
else {
- s += sprintf(s, "%u", i);
+ s += xsnprintf(s, sizeof(outstr) - (s - outstr),
+ "%u", i);
}
sep = ' ';
}