[easytag] Fix pointer arithmetic when reading CDDB result



commit debc2d333fa7a1679e4828f1d8f78f8a1546f7e2
Author: David King <amigadave amigadave com>
Date:   Wed Jan 7 09:23:54 2015 +0000

    Fix pointer arithmetic when reading CDDB result
    
    Found with cppcheck.

 src/cddb_dialog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/cddb_dialog.c b/src/cddb_dialog.c
index 48d0112..1d17736 100644
--- a/src/cddb_dialog.c
+++ b/src/cddb_dialog.c
@@ -1100,7 +1100,7 @@ Cddb_Get_Album_Tracks_List (EtCDDBDialog *self, GtkTreeSelection* selection)
 
                 gchar *alb_ptr = strstr(cddb_out," / ");
                 // Album
-                if (alb_ptr && alb_ptr+3)
+                if (alb_ptr && alb_ptr[3])
                 {
                     cddbalbum->album = Try_To_Validate_Utf8_String(alb_ptr+3);
                     *alb_ptr = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]