]> git.sesse.net Git - vlc/commitdiff
fix out of buffer read in equalizer code
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Thu, 21 Dec 2006 00:07:11 +0000 (00:07 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Thu, 21 Dec 2006 00:07:11 +0000 (00:07 +0000)
modules/gui/qt4/components/extended_panels.cpp

index 8a9a803e5efc8d58993ecf37223a7c2160840ab9..37afab8b02b11560ef20e6abe493b7c96c429da1 100644 (file)
@@ -364,9 +364,9 @@ void Equalizer::setValues( char *psz_bands, float f_preamp )
             sprintf( psz_val, "% 5.1f", f );
             band_texts[i]->setText( band_frequencies[i] + "\n" + psz_val +
                                     "dB" );
-            if( p == NULL ) break;
+            if( p == NULL || *p == '\0' ) break;
             p++;
-            if( *p == 0 )  break;
+            if( *p == '\0' )  break;
         }
     }
     char psz_val[5];