Checking length of pseudo-drive address to prevent possible overflow
This commit is contained in:
parent
046f581baa
commit
ca29b77091
@ -4461,6 +4461,13 @@ int Cdrskin_driveno_to_btldev(struct CdrskiN *skin, int driveno,
|
|||||||
loc= adr;
|
loc= adr;
|
||||||
ret= burn_drive_get_drive_role(skin->drives[driveno].drive);
|
ret= burn_drive_get_drive_role(skin->drives[driveno].drive);
|
||||||
if(ret!=1) {
|
if(ret!=1) {
|
||||||
|
if(strlen(adr) > Cdrskin_adrleN - 7) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"cdrskin : FAILURE : File path too long for \"stdio:\" prefix: %s\n",
|
||||||
|
adr);
|
||||||
|
sprintf(btldev, "stdio:"); /* Address of the null drive */
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
sprintf(btldev,"stdio:%s",adr);
|
sprintf(btldev,"stdio:%s",adr);
|
||||||
{ret= 2; goto adr_translation;}
|
{ret= 2; goto adr_translation;}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2023.06.07.183206"
|
#define Cdrskin_timestamP "2023.09.12.132011"
|
||||||
|
Loading…
Reference in New Issue
Block a user