← Commit list

8c02407bef

Viktor Szakats
Viktor Szakats
2025-12-31
SUCCESS Duration: 252s

Subject

tool_doswin: add debug envs to test filename sanitization failure modes

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

src/tool_doswin.c+7 -0
@@ -206,6 +206,13 @@ SANITIZEcode sanitize_file_name(char ** const sanitized, const char *file_name,
}
}
+#ifdef DEBUGBUILD
+ if(getenv("CURL_FN_SANITIZE_BAD"))
+ return SANITIZE_ERR_INVALID_PATH;
+ if(getenv("CURL_FN_SANITIZE_OOM"))
+ return SANITIZE_ERR_OUT_OF_MEMORY;
+#endif
+
*sanitized = target;
return SANITIZE_ERR_OK;
}