Hello community, here is the log from the commit of package ckermit checked in at Thu Dec 7 19:27:32 CET 2006. -------- --- ckermit/ckermit.changes 2006-02-27 17:12:10.000000000 +0100 +++ /mounts/work_src_done/STABLE/ckermit/ckermit.changes 2006-11-30 12:11:52.000000000 +0100 @@ -1,0 +2,5 @@ +Thu Nov 30 12:10:29 CET 2006 - prusnak@suse.cz + +- fixed comparison with string literal (string_comparison.diff) [#224842] + +------------------------------------------------------------------- New: ---- cku211-string_comparison.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ckermit.spec ++++++ --- /var/tmp/diff_new_pack.muOSR9/_old 2006-12-07 19:27:25.000000000 +0100 +++ /var/tmp/diff_new_pack.muOSR9/_new 2006-12-07 19:27:25.000000000 +0100 @@ -19,7 +19,7 @@ Provides: kermit Autoreqprov: on Version: 8.0.211 -Release: 10 +Release: 39 URL: http://www.columbia.edu/kermit/ Source: %{archiv_name}.tar.bz2 Patch0: %{archiv_name}-fmt.diff @@ -29,6 +29,7 @@ Patch4: %{archiv_name}-EMrename.diff Patch5: %{archiv_name}-debug.diff Patch6: %{archiv_name}-uninitialized.diff +Patch7: %{archiv_name}-string_comparison.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -48,6 +49,7 @@ %patch4 #%patch5 %patch6 +%patch7 %build make linux+openssl+shadow KFLAGS="$RPM_OPT_FLAGS" \ @@ -71,6 +73,8 @@ /usr/bin/* %changelog -n ckermit +* Thu Nov 30 2006 - prusnak@suse.cz +- fixed comparison with string literal (string_comparison.diff) [#224842] * Mon Feb 27 2006 - anicka@suse.cz - fix uninitialized variable (#152938) * Wed Jan 25 2006 - mls@suse.de ++++++ cku211-string_comparison.diff ++++++ --- ckuus3.c +++ ckuus3.c @@ -10283,20 +10283,22 @@ int i,len; if ((y = cmtxt("Prompt string","",&s,xxstring)) < 0) return(y); - if (s == "") s = NULL; + if (s && !strlen(s)) s = NULL; if (s) { s = brstrip(s); - if (s == "") s = NULL; + if (s && !strlen(s)) s = NULL; } /* we must check to make sure there are no % fields */ - len = strlen(s); - for (i = 0; i < len; i++) { - if (s[i] == '%') { - if (s[i+1] != '%') { - printf("%% fields are not used in this command.\n"); - return(-9); + if (s) { + len = strlen(s); + for (i = 0; i < len; i++) { + if (s[i] == '%') { + if (s[i+1] != '%') { + printf("%% fields are not used in this command.\n"); + return(-9); + } + i++; } - i++; } } makestr(&tn_pr_uid,s); @@ -12400,33 +12402,35 @@ krb4_autodel = z; break; case XYKRBPRM: /* Prompt */ - if (s == "") s = NULL; + if (s && !strlen(s)) s = NULL; if (s) { s = brstrip(s); - if (s == "") s = NULL; + if (s && !strlen(s)) s = NULL; } switch (z) { case KRB_PW_PRM: { /* Password */ /* Check that there are no more than */ /* two % fields and % must followed by 's'. */ int i,n,len; - len = strlen(s); - for (i = 0, n = 0; i < len; i++) { - if (s[i] == '%') { - if (s[i+1] != '%') { - if (s[i+1] != 's') { - printf( - "Only %%s fields are permitted.\n" - ); - return(-9); - } - if (++n > 2) { - printf( - "Only two %%s fields are permitted.\n"); - return(-9); + if (s) { + len = strlen(s); + for (i = 0, n = 0; i < len; i++) { + if (s[i] == '%') { + if (s[i+1] != '%') { + if (s[i+1] != 's') { + printf( + "Only %%s fields are permitted.\n" + ); + return(-9); + } + if (++n > 2) { + printf( + "Only two %%s fields are permitted.\n"); + return(-9); + } } + i++; } - i++; } } if (kv == 5) @@ -12438,15 +12442,17 @@ case KRB_PR_PRM: { /* Principal */ /* Check to make sure there are no % fields */ int i,len; - len = strlen(s); - for (i = 0; i < len; i++) { - if (s[i] == '%') { - if (s[i+1] != '%') { - printf( - "%% fields are not used in this command.\n"); - return(-9); + if (s) { + len = strlen(s); + for (i = 0; i < len; i++) { + if (s[i] == '%') { + if (s[i+1] != '%') { + printf( + "%% fields are not used in this command.\n"); + return(-9); + } + i++; } - i++; } } if (kv == 5) @@ -12487,32 +12493,34 @@ return(y); switch (x) { /* Copy value to right place */ case XYSRPPRM: /* Prompt */ - if (s == "") s = NULL; + if (s && !strlen(s)) s = NULL; if (s) { s = brstrip(s); - if (s == "") s = NULL; + if (s && !strlen(s)) s = NULL; } switch (z) { case SRP_PW_PRM: { /* Password */ /* Check %s fields */ int i,n,len; - len = strlen(s); - for (i = 0, n = 0; i < len; i++) { - if (s[i] == '%') { - if (s[i+1] != '%') { - if (s[i+1] != 's') { - printf( - "Only %%s fields are permitted.\n"); - return(-9); - } - if (++n > 1) { - printf( - "Only one %%s field is permitted.\n"); - return(-9); - } + if (s) { + len = strlen(s); + for (i = 0, n = 0; i < len; i++) { + if (s[i] == '%') { + if (s[i+1] != '%') { + if (s[i+1] != 's') { + printf( + "Only %%s fields are permitted.\n"); + return(-9); + } + if (++n > 1) { + printf( + "Only one %%s field is permitted.\n"); + return(-9); + } + } + i++; } - i++; - } + } } makestr(&srppwprompt,s); break; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de