[PATCH 11/13] strncpy fix Handled git pipeline errors

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

 



From: Haritha D <harithamma.d@xxxxxxx>

This PR has fixes to enable build on z/OS

Signed-off-by: Harithamma D <harithamma.d@xxxxxxx>
---
 convert.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/convert.c b/convert.c
index ef44e6429da..16173a1caf6 100644
--- a/convert.c
+++ b/convert.c
@@ -1326,8 +1326,9 @@ static const char* get_platform(void) {
 	{
 		int index=0;
 		result = (char *)malloc(strlen(uname_info.sysname)+1);
-		while(result[index] = uname_info.sysname[index])
+		while(index <= strlen(uname_info.sysname))
 		{
+			result[index] = uname_info.sysname[index];
 			index++;
 		}
 	}
-- 
gitgitgadget





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux