hrev54191 adds 1 changeset to branch 'master'
old head: 95e5e933abc148ed236c183083cd1a222f2f261b
new head: 194b772d8c903750abffe3d4453ff9b0213cd9e3
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=194b772d8c90+%5E95e5e933abc1
----------------------------------------------------------------------------
194b772d8c90: listattr: Make sure attributes are properly terminated
* This reduces garbage in the output, especially with 0 byte string
types.
[ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev54191
Commit: 194b772d8c903750abffe3d4453ff9b0213cd9e3
URL: https://git.haiku-os.org/haiku/commit/?id=194b772d8c90
Author: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Date: Tue May 12 12:01:10 2020 UTC
----------------------------------------------------------------------------
1 file changed, 2 insertions(+), 1 deletion(-)
src/bin/listattr.cpp | 3 ++-
----------------------------------------------------------------------------
diff --git a/src/bin/listattr.cpp b/src/bin/listattr.cpp
index 00e0a19aad..ae7d64b3f0 100644
--- a/src/bin/listattr.cpp
+++ b/src/bin/listattr.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2015, Axel Dörfler, axeld@xxxxxxxxxxxxxxxx.
+ * Copyright 2004-2020, Axel Dörfler, axeld@xxxxxxxxxxxxxxxx.
* Copyright 2002, Ryan Fleet.
*
* Distributed under the terms of the MIT license.
@@ -76,6 +76,7 @@ show_attr_contents(BNode& node, const char* attribute, const
attr_info& info)
size);
return;
}
+ buffer[min_c(bytesRead, kLimit - 1)] = '\0';
switch (info.type) {
case B_INT8_TYPE: