[libbluray-devel] "document" tag checksum calculation
Petri Hintukainen
git at videolan.org
Mon Jun 5 12:12:31 CEST 2017
libudfread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Mon Jun 5 13:01:26 2017 +0300| [263256461d212f35c2246d6c0736d301b38c834b] | committer: Petri Hintukainen
"document" tag checksum calculation
> http://git.videolan.org/gitweb.cgi/libudfread.git/?a=commit;h=263256461d212f35c2246d6c0736d301b38c834b
---
src/ecma167.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ecma167.c b/src/ecma167.c
index b197a1f..2760d4d 100644
--- a/src/ecma167.c
+++ b/src/ecma167.c
@@ -85,10 +85,10 @@ enum tag_identifier decode_descriptor_tag(const uint8_t *buf)
/* calculate tag checksum */
for (i = 0; i < 4; i++) {
- checksum += buf[i];
+ checksum = (uint8_t)(checksum + buf[i]);
}
for (i = 5; i < 16; i++) {
- checksum += buf[i];
+ checksum = (uint8_t)(checksum + buf[i]);
}
if (checksum != buf[4]) {
More information about the libbluray-devel
mailing list