ports/net/nam/patches/patch-rng_cc

15 lines
231 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Fix off-by-one.
Index: rng.cc
--- rng.cc.orig
+++ rng.cc
@@ -817,7 +817,7 @@ RNG::RNG (const char *s)
{
if (strlen (s) > 99) {
strncpy (name_, s, 99);
- name_[100] = 0;
+ name_[99] = 0;
}
else
strcpy (name_, s);