Check return value from asprintf instead of string != NULL since it
undefined behavior on Linux. From Björn Sandell git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16227 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -115,7 +115,9 @@ proto (int sock, const char *hostname, const char *service)
|
||||
|
||||
name_token.length = asprintf ((char **)&name_token.value,
|
||||
"%s@%s", service, hostname);
|
||||
|
||||
if (name_token.length == -1)
|
||||
errx(1, "malloc - out of memory");
|
||||
|
||||
maj_stat = gss_import_name (&min_stat,
|
||||
&name_token,
|
||||
GSS_C_NT_HOSTBASED_SERVICE,
|
||||
|
Reference in New Issue
Block a user