From c494e40d0a161ebd0b83b6e977bebc402ab7ccfe Mon Sep 17 00:00:00 2001 From: david parsons Date: Mon, 7 Oct 2024 01:14:28 -0700 Subject: [PATCH] mkd_basename() was broken; the callback it uses did not check to see if the offending url started with a slash; also CHANGE MY NAME on the copyright notice for configure.inc --- basename.c | 2 +- configure.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/basename.c b/basename.c index b636a9b..30c4aac 100644 --- a/basename.c +++ b/basename.c @@ -20,7 +20,7 @@ e_basename(const char *string, const int size, void *context) char *ret; char *base = (char*)context; - if ( base && string && (ret=malloc(strlen(base)+size+2)) ) { + if ( base && string && string[0] == '/' && (ret=malloc(strlen(base)+size+2)) ) { strcpy(ret, base); strncat(ret, string, size); return ret; diff --git a/configure.inc b/configure.inc index ec4b151..a6b6eb0 100755 --- a/configure.inc +++ b/configure.inc @@ -1,4 +1,4 @@ -# Copyright (c) 1999-2017 David Parsons. All rights reserved. +# Copyright (c) 1999-2024 Jessica L. Parsons. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions