mirror of
https://github.com/Orc/discount.git
synced 2026-09-25 04:10:00 +03:00
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
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user