Made sure cdrom_image.c doesn't strcpy() from the same place to the same place.
This commit is contained in:
@@ -253,6 +253,9 @@ cdrom_image_open(cdrom_t *dev, const char *fn)
|
|||||||
{
|
{
|
||||||
cd_img_t *img;
|
cd_img_t *img;
|
||||||
|
|
||||||
|
/* Make sure to not STRCPY if the two are pointing
|
||||||
|
at the same place. */
|
||||||
|
if (fn != dev->image_path)
|
||||||
strcpy(dev->image_path, fn);
|
strcpy(dev->image_path, fn);
|
||||||
|
|
||||||
/* Create new instance of the CDROM_Image class. */
|
/* Create new instance of the CDROM_Image class. */
|
||||||
|
|||||||
Reference in New Issue
Block a user