Commit Diff


commit - cadc72f05df58d52f4654d58b4e07093d69c6422
commit + 2f26d3340d5e3957488707d3098e6ec7a417b67a
blob - 0fa917bcf26aed0154a46b3a681af4a7404d0777
blob + d957f57cb96bdd3843b1e17a19ad3b6b3961e921
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
@@ -129,6 +129,10 @@ got_get_repo_owner(char **owner, struct request *c, ch
 	gitconfig_owner = got_repo_get_gitconfig_owner(repo);
 	if (gitconfig_owner) {
 		*owner = strdup(gitconfig_owner);
+		if (*owner == NULL)
+			return got_error_from_errno("strdup");
+	} else {
+		*owner = strdup("");
 		if (*owner == NULL)
 			return got_error_from_errno("strdup");
 	}
blob - 85b940eabaac43f5c561a5ede946f4dc3f634a36
blob + b1e2e71c797de491dacf1bd4a1407a93e176103d
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
@@ -2058,8 +2058,12 @@ gotweb_get_repo_description(char **description, struct
 		goto done;
 	}
 
-	if (len == 0)
+	if (len == 0) {
+		*description = strdup("");
+		if (*description == NULL)
+			return got_error_from_errno("strdup");
 		goto done;
+	}
 
 	if (fseek(f, 0, SEEK_SET) == -1) {
 		error = got_ferror(f, GOT_ERR_IO);