Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fsck_udf Fix endian bug in descriptor CRC length on upd...
details: https://anonhg.NetBSD.org/src/rev/f5aa6be858c5
branches: trunk
changeset: 365803:f5aa6be858c5
user: reinoud <reinoud%NetBSD.org@localhost>
date: Mon Apr 25 15:18:15 2022 +0000
description:
Fix endian bug in descriptor CRC length on updating a FE/EFE
diffstat:
sbin/fsck_udf/main.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 3fc355b11f0f -r f5aa6be858c5 sbin/fsck_udf/main.c
--- a/sbin/fsck_udf/main.c Mon Apr 25 15:12:07 2022 +0000
+++ b/sbin/fsck_udf/main.c Mon Apr 25 15:18:15 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.11 2022/04/24 15:07:08 reinoud Exp $ */
+/* $NetBSD: main.c,v 1.12 2022/04/25 15:18:15 reinoud Exp $ */
/*
* Copyright (c) 2022 Reinoud Zandijk
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.11 2022/04/24 15:07:08 reinoud Exp $");
+__RCSID("$NetBSD: main.c,v 1.12 2022/04/25 15:18:15 reinoud Exp $");
#endif /* not lint */
#include <stdio.h>
@@ -3661,7 +3661,7 @@
{
struct file_entry *fe = NULL;
struct extfile_entry *efe = NULL;
- int error;
+ int crc_len, error;
vat_writeout = 1;
if (udf_rw16(dscr->tag.id) == TAGID_FENTRY) {
@@ -3682,7 +3682,8 @@
}
/* fixup CRC length (if needed) */
- dscr->tag.desc_crc_len = udf_tagsize(dscr, 1) - sizeof(struct desc_tag);
+ crc_len = udf_tagsize(dscr, 1) - sizeof(struct desc_tag);
+ dscr->tag.desc_crc_len = udf_rw16(crc_len);
pwarn("%s : updating node\n", udf_node_path(node));
error = udf_write_dscr_virt(dscr, udf_rw32(node->loc.loc.lb_num),
Home |
Main Index |
Thread Index |
Old Index