44 lines
1.3 KiB
Diff
44 lines
1.3 KiB
Diff
From 11707a80c2af681832689e6a6d1b66674d6c2ccb Mon Sep 17 00:00:00 2001
|
|
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
|
Date: Tue, 23 Jan 2018 18:23:37 +0100
|
|
Subject: [PATCH 18/33] Fix misleading indentation in security.c
|
|
|
|
---
|
|
libxslt/security.c | 18 ++++++++++--------
|
|
1 file changed, 10 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/libxslt/security.c b/libxslt/security.c
|
|
index 9c848cc..550dc4e 100644
|
|
--- a/libxslt/security.c
|
|
+++ b/libxslt/security.c
|
|
@@ -385,16 +385,18 @@ xsltCheckWrite(xsltSecurityPrefsPtr sec,
|
|
(xmlStrEqual(BAD_CAST uri->scheme, BAD_CAST "file"))) {
|
|
|
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
|
- if ((uri->path)&&(uri->path[0]=='/')&&
|
|
- (uri->path[1]!='\0')&&(uri->path[2]==':'))
|
|
- ret = xsltCheckWritePath(sec, ctxt, uri->path+1);
|
|
- else
|
|
+ if ((uri->path)&&(uri->path[0]=='/')&&
|
|
+ (uri->path[1]!='\0')&&(uri->path[2]==':'))
|
|
+ ret = xsltCheckWritePath(sec, ctxt, uri->path+1);
|
|
+ else
|
|
#endif
|
|
+ {
|
|
+ /*
|
|
+ * Check if we are allowed to write this file
|
|
+ */
|
|
+ ret = xsltCheckWritePath(sec, ctxt, uri->path);
|
|
+ }
|
|
|
|
- /*
|
|
- * Check if we are allowed to write this file
|
|
- */
|
|
- ret = xsltCheckWritePath(sec, ctxt, uri->path);
|
|
if (ret <= 0) {
|
|
xmlFreeURI(uri);
|
|
return(ret);
|
|
--
|
|
1.8.3.1
|
|
|