File sblim-overflow.patch of Package sblim-cmpi-boot_control_profile

Index: src/Resource.c
===================================================================
--- src/Resource.c.orig
+++ src/Resource.c
@@ -98,7 +98,7 @@ int LoadGrubMenu(const char* path, struc
         {
             item = &menu->items[menu->numItems];
             item->title[0] = '\0';
-            strncat(item->title, p + 6, sizeof(item->title));
+            strncat(item->title, p + 6, sizeof(item->title)-1);
             menu->numItems++;
         }
         else if (strncmp(p, "root", 4) == 0 && isspace(p[4]))
@@ -112,7 +112,7 @@ int LoadGrubMenu(const char* path, struc
 
             item = &menu->items[menu->numItems-1];
             item->root[0] = '\0';
-            strncat(item->root, p + 5, sizeof(item->root));
+            strncat(item->root, p + 5, sizeof(item->root)-1);
         }
         else if (strncmp(p, "kernel", 6) == 0 && isspace(p[6]))
         {
@@ -125,7 +125,7 @@ int LoadGrubMenu(const char* path, struc
 
             item = &menu->items[menu->numItems-1];
             item->kernel[0] = '\0';
-            strncat(item->kernel, p + 7, sizeof(item->kernel));
+            strncat(item->kernel, p + 7, sizeof(item->kernel)-1);
         }
         else if (strncmp(p, "initrd", 6) == 0 && isspace(p[6]))
         {
@@ -138,7 +138,7 @@ int LoadGrubMenu(const char* path, struc
 
             item = &menu->items[menu->numItems-1];
             item->initrd[0] = '\0';
-            strncat(item->initrd, p + 7, sizeof(item->initrd));
+            strncat(item->initrd, p + 7, sizeof(item->initrd)-1);
         }
         else if (strncmp(p, "rootnoverify", 12) == 0 && isspace(p[12]))
         {
@@ -151,7 +151,7 @@ int LoadGrubMenu(const char* path, struc
 
             item = &menu->items[menu->numItems-1];
             item->rootnoverify[0] = '\0';
-            strncat(item->rootnoverify, p + 13, sizeof(item->rootnoverify));
+            strncat(item->rootnoverify, p + 13, sizeof(item->rootnoverify)-1);
         }
         else if (strncmp(p, "chainloader", 11) == 0 && isspace(p[11]))
         {
@@ -164,7 +164,7 @@ int LoadGrubMenu(const char* path, struc
 
             item = &menu->items[menu->numItems-1];
             item->chainloader[0] = '\0';
-            strncat(item->chainloader, p + 12, sizeof(item->chainloader));
+            strncat(item->chainloader, p + 12, sizeof(item->chainloader)-1);
         }
     }
openSUSE Build Service is sponsored by