libcdio-devel
[Top][All Lists]
Advanced

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

[Libcdio-devel] [PATCH] iso9660: Fixing off by one error in rock.c


From: Seija Kijin
Subject: [Libcdio-devel] [PATCH] iso9660: Fixing off by one error in rock.c
Date: Thu, 20 Oct 2022 10:54:58 -0400

The NULL termination is written to the 11th element of the result
buffer, when it should be the 10th.
---
 lib/iso9660/rock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/iso9660/rock.c b/lib/iso9660/rock.c
index a957d785..5b6e67d9 100644
--- a/lib/iso9660/rock.c
+++ b/lib/iso9660/rock.c
@@ -471,7 +471,7 @@ iso9660_get_rock_attr_str(posix_mode_t st_mode)
   result[ 8] = (st_mode & ISO_ROCK_IWOTH) ? 'w' : '-';
   result[ 9] = (st_mode & ISO_ROCK_IXOTH) ? 'x' : '-';

-  result[11] = '\0';
+  result[10] = '\0';

   return result;
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]