semodule_package: fix wrong variable in error message
PATCH 1/1 semodule_package: fix wrong variable in error message
Use 'outfile' instead of 'argv[1]' in the error message for sepol_module_package_write() failure. argv[1] does not reliably reflect the output filename since argument order is not fixed.
--- semodule-utils/semodule_package/semodule_package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
semodule-utils/semodule_package/semodule_package.c +1 -1
@@ -266,7 +266,7 @@ int main(int argc, char **argv)if (sepol_module_package_write (pkg, out)) {fprintf (stderr,"%s: Error while writing module package to %s\n" , - argv[0 ], argv[1 ]); + argv[0 ], outfile); goto failure; }
Signature · 1 line
2.53.0