From 8905e7095aa97dac4a047adca9e040f2e9ea1ffa Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Mon, 19 Dec 2016 10:37:10 +0900 Subject: [PATCH] Safer conversion of boolean values in ASF attributes. Technically, boolean values in Extended Content Description Object is not necessarily be 0 or 1. --- taglib/asf/asfattribute.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taglib/asf/asfattribute.cpp b/taglib/asf/asfattribute.cpp index 1e6ed705..66c1996a 100644 --- a/taglib/asf/asfattribute.cpp +++ b/taglib/asf/asfattribute.cpp @@ -217,10 +217,10 @@ String ASF::Attribute::parse(ASF::File &f, int kind) case BoolType: if(kind == 0) { - d->boolValue = (readDWORD(&f) == 1); + d->boolValue = (readDWORD(&f) != 0); } else { - d->boolValue = (readWORD(&f) == 1); + d->boolValue = (readWORD(&f) != 0); } break; -- 2.40.0