0009-patch-Avoid-d_namlen.patch (789B)
1 From 602381b693ff286ed17a9a04bfceaeb255992843 Mon Sep 17 00:00:00 2001 2 From: Michael Forney <mforney@mforney.org> 3 Date: Sat, 4 Jun 2016 18:40:37 -0700 4 Subject: [PATCH] patch: Avoid d_namlen 5 6 --- 7 usr.bin/patch/backupfile.c | 2 +- 8 1 file changed, 1 insertion(+), 1 deletion(-) 9 10 diff --git a/usr.bin/patch/backupfile.c b/usr.bin/patch/backupfile.c 11 index ed0767762e0..fc05e48e68d 100644 12 --- a/usr.bin/patch/backupfile.c 13 +++ b/usr.bin/patch/backupfile.c 14 @@ -106,7 +106,7 @@ max_backup_version(const char *file, const char *dir) 15 file_name_length = strlen(file); 16 17 while ((dp = readdir(dirp)) != NULL) { 18 - if (dp->d_namlen <= file_name_length) 19 + if (strlen(dp->d_name) <= file_name_length) 20 continue; 21 22 this_version = version_number(file, dp->d_name, file_name_length); 23 -- 24 2.31.1 25