From: Theodore Tso Date: Wed, 22 Oct 1997 03:30:15 +0000 (+0000) Subject: Add checks so that code doesn't bomb out if the version resource is X-Git-Tag: krb5-1.1-beta1~983 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=297021298ebfb22240f1d0626d9188d4287ca5bf;p=krb5.git Add checks so that code doesn't bomb out if the version resource is missing a Title or Version record. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10242 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/ChangeLog b/src/lib/ChangeLog index d21d3c288..90efcdfca 100644 --- a/src/lib/ChangeLog +++ b/src/lib/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 21 23:29:18 1997 Theodore Y. Ts'o + + * win_glue.c: Add checks so that code doesn't bomb out if the + version resource is missing a Title or Version record. + Fri Aug 1 22:03:24 1997 Theodore Y. Ts'o * Makefile.in, krb5.rc, version.rc: Add support for adding a diff --git a/src/lib/win_glue.c b/src/lib/win_glue.c index 8df5880ef..1d4dba8cd 100644 --- a/src/lib/win_glue.c +++ b/src/lib/win_glue.c @@ -164,6 +164,9 @@ void GetCallingAppVerInfo( char *AppTitle, char *AppVer, char *AppIni, /* try a localAppTitle and then a strcpy 4/2/97 */ + locAppTitle = 0; + locAppVer = 0; + retval = VerQueryValue(lpVersionInfo, szVerQ, &locAppTitle, &dumint); @@ -173,6 +176,12 @@ void GetCallingAppVerInfo( char *AppTitle, char *AppVer, char *AppIni, retval = VerQueryValue(lpVersionInfo, szVerQ, &locAppVer, &dumint); + if (!locAppTitle || !locAppVer) { + /* Punt, we don't have the right version resource records */ + *VSflag = FALSE; + return; + } + /* * We don't have a way to determine that INI file of the * application at the moment so let's just use krb5.ini