ref: dc4a98048dff10c1c39e358faa66d485d33cf41a
parent: efaa6d9ff7c0c1f53cc28ea00721b782c722cb18
author: Anthony J. Bentley <[email protected]>
date: Mon Jan 23 20:26:15 EST 2017
Simplify string copy by using strlcpy().
--- a/src/asm/fstack.c
+++ b/src/asm/fstack.c
@@ -184,12 +184,10 @@
return;
}
- if (strlen(s) > _MAX_PATH) {
+ if (strlcpy(IncludePaths[NextIncPath++], s, _MAX_PATH) >= _MAX_PATH) {
fatalerror("Include path too long '%s'",s);
return;
}
-
- strcpy(IncludePaths[NextIncPath++], s);
}
FILE *