make sure we dont print off the end of the gss_buffer_t, they are defined to not included NULL, in heimdal they are but thats an implementation detail, dont teach people about that. From: Christian Krause

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24035 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-11-12 04:19:52 +00:00
parent 370256ce41
commit 25a7b258ea
9 changed files with 36 additions and 17 deletions

View File

@@ -53,7 +53,7 @@ main(int argc, char **argv)
if (GSS_ERROR(maj_stat))
errx(1, "gss_oid_to_str failed");
ret = strcmp(data.value, "1 2 840 113554 1 2 2");
ret = strncmp(data.value, "1 2 840 113554 1 2 2", data.length);
gss_release_buffer(&maj_stat, &data);
if (ret)
return 1;
@@ -62,7 +62,7 @@ main(int argc, char **argv)
if (GSS_ERROR(maj_stat))
errx(1, "gss_oid_to_str failed");
ret = strcmp(data.value, "1 3 6 1 5 6 4");
ret = strnncmp(data.value, "1 3 6 1 5 6 4", data.length);
gss_release_buffer(&maj_stat, &data);
if (ret)
return 1;