]> err.no Git - yubikey-personalization/commitdiff
check that ykp_export_config() call actually worked
authorKlas Lindfors <klas@yubico.com>
Fri, 19 Apr 2013 13:29:14 +0000 (15:29 +0200)
committerKlas Lindfors <klas@yubico.com>
Fri, 19 Apr 2013 13:29:14 +0000 (15:29 +0200)
ykpersonalize.c

index 5aaaa061a85d7cdbb55b5858ad2ae5b88ce821d2..16f2733bf995e7c1ac3005a85891fa7db1e8fb06 100644 (file)
@@ -198,7 +198,9 @@ int main(int argc, char **argv)
        }
 
        if (outf) {
-               ykp_export_config(cfg, data, 1024, data_format);
+               if(!(ykp_export_config(cfg, data, 1024, data_format))) {
+                       goto err;
+               }
                if(!(fwrite(data, 1, strlen(data), outf))) {
                        goto err;
                }