commit - 977259281baa8a7a2776eefc691db02976cae993
commit + 1999985f9a161118336b49101e3aab94bced7722
blob - 3c69584a92b6b958e709a94fbda0d8de2e82ccf9
blob + 341cf75d34498e24ad33414f270b7cb0234960e0
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
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 - f42caf75b1d7617a6d2c489ec63602ed33a0957d
blob + 72a93ffe88a0fd5d23ee1850893733ac1c37c39c
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
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);