ref: 19f03d6a263eea5b49366150d3d23b22098bf54c
parent: 977768ac880deaa63c43998a84d0b0f68651f67e
author: Martin Storsjö <martin@martin.st>
date: Tue Jan 28 06:23:45 EST 2014
Fix parsing of the -drec option if ENABLE_FRAME_DUMP isn't set If the define wasn't set, the argument iterator didn't skip the file name argument.
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -562,8 +562,9 @@
#ifdef ENABLE_FRAME_DUMP
SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
pDLayer->sRecFileName[iLen] = '\0';
- strncpy (pDLayer->sRecFileName, argv[n++], iLen); // confirmed_safe_unsafe_usage
+ strncpy (pDLayer->sRecFileName, argv[n], iLen); // confirmed_safe_unsafe_usage
#endif//ENABLE_FRAME_DUMP
+ n++;
}
else if (!strcmp (pCommand, "-sw") && (n + 1 < argc)) {