- rstrlcpy() calculates source string size regardless of length limit,
but cpio fields are fixed length character arrays, not strings -> kaboom
- wondering if zero-terminating strncpy() variant might be more fit to our
purposes than strlcpy()-clone
#include <rpm/rpmio.h>
#include <rpm/rpmlog.h>
-#include <rpm/rpmstring.h>
#include "lib/cpio.h"
#include "lib/fsm.h"
char buf[num+1], * end;
unsigned long ret;
- rstrlcpy(buf, str, num+1);
+ strncpy(buf, str, num);
+ buf[num] = '\0';
ret = strtoul(buf, &end, base);
if (*end != '\0')