From 1277dcbaa186e0c8940f9efe36109b5a0f5142b3 Mon Sep 17 00:00:00 2001 From: David Levine Date: Mon, 17 Apr 2017 18:06:05 -0400 Subject: [PATCH] Use stat(3) instead of lstat(3), to dereference symbolic links. Fix to commit 4318012376e06229307c0ed4f62a00faae9edc63. --- uip/mhparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uip/mhparse.c b/uip/mhparse.c index 03d7ae35..c17bd785 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -245,8 +245,8 @@ parse_mime (char *file) return NULL; } fseek (fp, 0L, SEEK_SET); - } else if (lstat (file, &statbuf) == NOTOK) { - advise (file, "unable to lstat"); + } else if (stat (file, &statbuf) == NOTOK) { + advise (file, "unable to stat"); return NULL; } else if (S_ISDIR(statbuf.st_mode)) { /* Don't try to parse a directory. */ -- 2.56.0