mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Modified cSVDRP::CmdGRAB() to avoid writing into const data (backport from version 1.7.8)
This commit is contained in:
parent
6715f40484
commit
36b1caedc2
@ -2369,3 +2369,5 @@ Ralf Schueler <dl4mw@schueler.ws>
|
|||||||
to 1.6.0-3
|
to 1.6.0-3
|
||||||
for backporting "Added some missing 'const' keywords to avoid compilation errors
|
for backporting "Added some missing 'const' keywords to avoid compilation errors
|
||||||
with gcc 4.4" from version 1.7.8 to 1.6.0-3
|
with gcc 4.4" from version 1.7.8 to 1.6.0-3
|
||||||
|
for backporting "Modified cSVDRP::CmdGRAB() to avoid writing into const data"
|
||||||
|
from version 1.7.8 to 1.6.0-3
|
||||||
|
2
HISTORY
2
HISTORY
@ -5765,3 +5765,5 @@ Video Disk Recorder Revision History
|
|||||||
(backport from version 1.7.3, thanks to Ralf Schueler).
|
(backport from version 1.7.3, thanks to Ralf Schueler).
|
||||||
- Added some missing 'const' keywords to avoid compilation errors with gcc 4.4
|
- Added some missing 'const' keywords to avoid compilation errors with gcc 4.4
|
||||||
(backport from version 1.7.8, thanks to Ralf Schueler).
|
(backport from version 1.7.8, thanks to Ralf Schueler).
|
||||||
|
- Modified cSVDRP::CmdGRAB() to avoid writing into const data
|
||||||
|
(backport from version 1.7.8, thanks to Ralf Schueler).
|
||||||
|
8
svdrp.c
8
svdrp.c
@ -10,7 +10,7 @@
|
|||||||
* and interact with the Video Disk Recorder - or write a full featured
|
* and interact with the Video Disk Recorder - or write a full featured
|
||||||
* graphical interface that sits on top of an SVDRP connection.
|
* graphical interface that sits on top of an SVDRP connection.
|
||||||
*
|
*
|
||||||
* $Id: svdrp.c 1.109.1.2 2012/02/14 13:52:35 kls Exp $
|
* $Id: svdrp.c 1.109.1.3 2012/02/14 13:55:52 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "svdrp.h"
|
#include "svdrp.h"
|
||||||
@ -803,9 +803,9 @@ void cSVDRP::CmdGRAB(const char *Option)
|
|||||||
FileName = s;
|
FileName = s;
|
||||||
}
|
}
|
||||||
slash = strrchr(FileName, '/'); // there definitely is one
|
slash = strrchr(FileName, '/'); // there definitely is one
|
||||||
*slash = 0;
|
cString t(s);
|
||||||
char *r = realpath(FileName, RealFileName);
|
t.Truncate(slash - FileName);
|
||||||
*slash = '/';
|
char *r = realpath(t, RealFileName);
|
||||||
if (!r) {
|
if (!r) {
|
||||||
LOG_ERROR_STR(FileName);
|
LOG_ERROR_STR(FileName);
|
||||||
Reply(501, "Invalid file name \"%s\"", FileName);
|
Reply(501, "Invalid file name \"%s\"", FileName);
|
||||||
|
Loading…
Reference in New Issue
Block a user