Displaying 3 results from an estimated 3 matches for "5ea4e41".
2014 Apr 15
1
[PATCH] Null terminate before printing the link name.
...xes garbage I'm seeing consistently from readlink
/dev/disk/by-uuid/..... during boot.
Signed-off-by: Rafi Rubin <rafi at seas.upenn.edu>
- ---
usr/utils/readlink.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c
index 5ea4e41..75a0735 100644
- --- a/usr/utils/readlink.c
+++ b/usr/utils/readlink.c
@@ -15,6 +15,7 @@ int main(int argc, char *argv[])
{
char *name, *link_name = NULL;
size_t max_siz = 128;
+ size_t actual_siz = 0;
progname = *argv++;
@@ -28,8 +29,9 @@ int main(int argc, char *...
2014 Apr 15
0
[klibc:master] readlink: Better buffer handling
...her than printf()
Reported-by: Rafi Rubin <rafi at seas.upenn.edu>
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
usr/utils/readlink.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c
index 5ea4e41..8b620fd 100644
--- a/usr/utils/readlink.c
+++ b/usr/utils/readlink.c
@@ -13,8 +13,9 @@ static __noreturn usage(void)
int main(int argc, char *argv[])
{
- char *name, *link_name = NULL;
- size_t max_siz = 128;
+ const char *name;
+ char link_name[PATH_MAX];
+ int rv;
progname = *argv++;
@...
2011 Jul 07
5
[PATCH 0/5] checkpatch cleanups
It seems checkpatch errors krept in, this is a first go.
Next run will go into usr/kinit directory.
No code changes, just codingstyle fixes (verified with size(3)).
maximilian attems (5):
[klibc] sleep: have argument on next line
[klibc] readklink: remove unneeded braces
[klibc] mount: whitespace policy
[klibc] ls: fix various checkpatch complaints
[klibc] tests: checkpatch fixlets