diff options
Diffstat (limited to 'testcode/unitneg.c')
-rw-r--r-- | testcode/unitneg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testcode/unitneg.c b/testcode/unitneg.c index 2b67df18232f..4cd9b306c72e 100644 --- a/testcode/unitneg.c +++ b/testcode/unitneg.c @@ -94,7 +94,7 @@ static void print_neg_cache(struct val_neg_cache* neg) /** get static pointer to random zone name */ static char* get_random_zone(void) { - static char zname[256]; + static char zname[36]; int labels = random() % 3; int i; char* p = zname; @@ -102,10 +102,10 @@ static char* get_random_zone(void) for(i=0; i<labels; i++) { labnum = random()%10; - snprintf(p, 256-(p-zname), "\003%3.3d", labnum); + snprintf(p, sizeof(zname)-(p-zname), "\003%3.3d", labnum); p+=4; } - snprintf(p, 256-(p-zname), "\007example\003com"); + snprintf(p, sizeof(zname)-(p-zname), "\007example\003com"); return zname; } |