Check error returns from strupper_m() (in all reasonable places).
[metze/samba/wip.git] / source3 / libads / kerberos_keytab.c
index 0e23a6add3952792e11a9e35c23e135e79ed4121..eb2603b672093f64ad62112613ce3f3030cb43d4 100644 (file)
@@ -564,7 +564,10 @@ int ads_keytab_create_default(ADS_STRUCT *ads)
 
        /* upper case the sAMAccountName to make it easier for apps to
           know what case to use in the keytab file */
-       strupper_m(sam_account_name);
+       if (!strupper_m(sam_account_name)) {
+               ret = -1;
+               goto done;
+       }
 
        ret = ads_keytab_add_entry(ads, sam_account_name);
        if (ret != 0) {