mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
libeplayer3/input: no need for alloca()
This commit is contained in:
@@ -273,7 +273,7 @@ bool Input::ReadSubtitle(const char *filename, const char *format, int pid)
|
|||||||
const char *lastDot = strrchr(filename, '.');
|
const char *lastDot = strrchr(filename, '.');
|
||||||
if (!lastDot)
|
if (!lastDot)
|
||||||
return false;
|
return false;
|
||||||
char *subfile = (char *) alloca(strlen(filename) + strlen(format));
|
char subfile[strlen(filename) + strlen(format)];
|
||||||
strcpy(subfile, filename);
|
strcpy(subfile, filename);
|
||||||
strcpy(subfile + (lastDot + 1 - filename), format);
|
strcpy(subfile + (lastDot + 1 - filename), format);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user