core: Use OSTREE_SHA256_STRING_LEN instead of 64

Closes: #359
Approved by: cgwalters
This commit is contained in:
Mathnerd314 authored and Atomic Bot committed 2016-06-22 16:10:01 +00:00
1 parent 91ccaff197
commit 4cb77c51db
14 files changed
+39 -27

No files matched your search

+3 -3
View File
@@ -341,10 +341,10 @@ ostree_repo_resolve_partial_checksum (OstreeRepo *self,
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
/* If the input is longer than 64 chars or contains non-hex chars,
/* If the input is longer than OSTREE_SHA256_STRING_LEN chars or contains non-hex chars,
don't bother looking for it as an object */
off = strspn (refspec, hexchars);
if (off > 64 || refspec[off] != '\0')
if (off > OSTREE_SHA256_STRING_LEN || refspec[off] != '\0')
return TRUE;
/* this looks through all objects and adds them to the ref_list if:
@@ -740,7 +740,7 @@ ostree_repo_remote_list_refs (OstreeRepo *self,
{
const char *ref_name = NULL;
g_autoptr(GVariant) csum_v = NULL;
char tmp_checksum[65];
char tmp_checksum[OSTREE_SHA256_STRING_LEN+1];
g_variant_get_child (child, 0, "&s", &ref_name);