Blame SOURCES/make-sure-auto-info-is-NULL-terminated.patch

717483
diff --git a/context.c b/context.c
717483
index 8b3754b..9128a82 100644
717483
--- a/context.c
717483
+++ b/context.c
717483
@@ -83,9 +83,12 @@ auth_fn (SMBCCTX *ctx,
717483
       return;
717483
     }
717483
 
717483
-  strncpy (workgroup, use_workgroup, wgmaxlen);
717483
-  strncpy (username, use_username, unmaxlen);
717483
-  strncpy (password, use_password, pwmaxlen);
717483
+  strncpy (workgroup, use_workgroup, wgmaxlen - 1);
717483
+  workgroup[wgmaxlen - 1] = '\0';
717483
+  strncpy (username, use_username, unmaxlen - 1);
717483
+  username[unmaxlen - 1] = '\0';
717483
+  strncpy (password, use_password, pwmaxlen - 1);
717483
+  password[pwmaxlen - 1] = '\0';
717483
   Py_DECREF (result);
717483
   debugprintf ("<- auth_fn(), got callback result\n");
717483
 }