Created attachment 524284 [details, diff] Patch to fix uninitialized use of $md5sum_file in determine_state( ) Example: minbar:root:~:7 # cfg-update -l Searching for updates... Use of uninitialized value $md5sum_file in regexp compilation at /usr/bin/cfg-update line 1000. 1 Unmodified File /etc/apache2/vhosts.d/._cfg0000_00_default_ssl_vhost.conf Use of uninitialized value $md5sum_file in regexp compilation at /usr/bin/cfg-update line 1000. 2 Unmodified File /etc/apache2/vhosts.d/._cfg0000_00_default_vhost.conf Use of uninitialized value $md5sum_file in regexp compilation at /usr/bin/cfg-update line 1000. 3 Unmodified File /etc/apache2/vhosts.d/._cfg0000_default_vhost.include $md5sum_file is declared globally, but not initialized, at /usr/bin/cfg-update line 176. It is then never used except within determine_state( ), which will use it without initialization if $file1 is not found. ($md5sum_index is also declared as a global but then never used outside of determine_state( ). It looks like pretty much EVERYTHING is declared globally, whether used globally or not.) Fix is pretty straightforward, and is attached. This patch does two things: 1. Move the declarations of $md5sum_file and $md5sum_index into determine_state( ), since they are used nowhere else; 2. Modify determine_state( ) so that the code block beginning at line 1000, which compares md5sums for $file1, is executed only if $file1 was actually found and an md5sum for it was calculated.
- have exactly the same problem in lxc container. - occured directly after updating perl (5.26 --> 5.28) - provided patch fixes it