Explorar o código

Merge branch 'HPCC-9664-fix' into candidate-4.0.0

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman %!s(int64=12) %!d(string=hai) anos
pai
achega
3aea67dedb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      esp/services/ws_fs/ws_fsService.cpp

+ 1 - 1
esp/services/ws_fs/ws_fsService.cpp

@@ -2330,9 +2330,9 @@ bool CFileSprayEx::onCopy(IEspContext &context, IEspCopy &req, IEspCopyResponse
             }
         }
 
+        CDfsLogicalFileName lfn; // NOTE: must not be moved into block below, or dstname will point to invalid memory
         if (!bRoxie)
         {
-            CDfsLogicalFileName lfn;
             if (!lfn.setValidate(dstname))
                 throw MakeStringException(ECLWATCH_INVALID_INPUT, "invalid destination filename");
             dstname = lfn.get();