Corrected reaction on unsupported track modes. Coverity CID 21804.

This commit is contained in:
Thomas Schmitt 2015-10-26 15:35:39 +00:00
parent 6136eaf86f
commit 98a6284402
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2015.10.26.151914" #define Cdrskin_timestamP "2015.10.26.153745"

View File

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */ /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens /* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2014 Thomas Schmitt <scdbackup@gmx.net> Copyright (c) 2006 - 2015 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
*/ */
@ -353,7 +353,7 @@ static int convert_data(struct burn_write_opts *o, struct burn_track *track,
/* ts A61010 */ /* ts A61010 */
/* a ssert(outlen >= inlen); */ /* a ssert(outlen >= inlen); */
if (outlen < inlen) if (outlen < inlen || outlen < 0 || inlen < 0)
return 0; return 0;
if ((outmode & BURN_MODE_BITS) == (inmode & BURN_MODE_BITS)) { if ((outmode & BURN_MODE_BITS) == (inmode & BURN_MODE_BITS)) {