X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=dotlock.c;h=4dea19687e372751ffcd077a2b0d1bbf17724042;hp=eb761ad32f6f552a5e6ec064064e05852003bacb;hb=8405d0fd3a83943d112b4a180cea3fc318a28a01;hpb=841934011451205d8295ac955486f06c317fdf15 diff --git a/dotlock.c b/dotlock.c index eb761ad..4dea196 100644 --- a/dotlock.c +++ b/dotlock.c @@ -126,7 +126,7 @@ static int dotlock_lock (const char *); #define check_flags(a) if (a & DL_FL_ACTIONS) usage (argv[0]) -size_t mutt_strlen (const char* s) { +size_t safe_strlen (const char* s) { return (s ? strlen (s) : 0); } @@ -453,7 +453,7 @@ static int dotlock_prepare (char *bn, size_t l, const char *f, int _fd) dirname = "."; } - if (mutt_strlen (basename) + 1 > l) + if (safe_strlen (basename) + 1 > l) return -1; strfcpy (bn, basename, l);