File dvdauthor-0.6.18-strcat.diff of Package dvdauthor

Index: dvdauthor/src/subreader.c
===================================================================
--- dvdauthor.orig/src/subreader.c
+++ dvdauthor/src/subreader.c
@@ -1286,7 +1286,7 @@ subtitle *sub_read_line_jacosub(FILE * f
                     if (!fgets(directive, LINE_LEN, fd))
                         return NULL;
                     trail_space(directive);
-                    strncat(line2, directive, (LINE_LEN > 511) ? LINE_LEN : 511);
+                    strncat(line2, directive, sizeof(line2)-strlen(line2)-1);
                     break;
                   } /*if*/
           /* fallthrough */