Bug 2116592

Summary: Use of uninitialized value $w in numeric gt (>) at /usr/lib64/perl5/vendor_perl/Cyrus/IMAP/Shell.pm line 676.
Product: Red Hat Enterprise Linux 9 Reporter: Ravindra Patil <ravpatil>
Component: cyrus-imapdAssignee: Martin Osvald 🛹 <mosvald>
Status: CLOSED MIGRATED QA Contact: František Hrdina <fhrdina>
Severity: low Docs Contact:
Priority: unspecified    
Version: 9.0CC: fhrdina, gnaik
Target Milestone: rcKeywords: MigratedToJIRA, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-21 18:34:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ravindra Patil 2022-08-09 01:37:38 UTC
Description of problem:

On installing cryus-imapd and after runnimg lm (list mailboxes) in cyradm the following warning occurs:

::1> lm
Use of uninitialized value $w in numeric gt (>) at /usr/lib64/perl5/vendor_perl/Cyrus/IMAP/Shell.pm line 676.

The mail boxes are listed and works as expected.

The perl script reporting issue is provided through perl-cyrus

$ rpm -qf /usr/lib64/perl5/vendor_perl/Cyrus/IMAP/Shell.pm
perl-Cyrus-3.4.1-6.el9.x86_64

The code snippet from Shell.pm

# cat /usr/lib64/perl5/vendor_perl/Cyrus/IMAP/Shell.pm

    668   foreach my $mbx (@res) {
    669     $l = $mbx->[0];
    670     if ($mbx->[1] ne '') {
    671       $l .= ' (' . $mbx->[1] . ')';
    672     }
    673     if (defined ($mbx->[3])) {
    674       $l .= ' (' . $mbx->[3] . ')';
    675     }
    676     if (length($l) + 1 > $w) {                  <<< $w is being called or used without being initialised
    677       $w = length($l) + 1;
 

Version-Release number of selected component (if applicable):
perl-Cyrus-3.4.1-6.el9.x86_64

How reproducible:
Use cryadm command and list mailboxes on the server. 

Steps to Reproduce:
1. Install cyrus-imapd, as dependencey perl-Cyrus is installed.
2. Connect using cyradm command.
3. List mailboxes 

Actual results:
- Getting warning in lm command. 

Use of uninitialized value $w in numeric gt (>) at /usr/lib64/perl5/vendor_perl/Cyrus/IMAP/Shell.pm line 676.

Which confuses non-perl programmers. 

Expected results:
- There should not be such warning to avoid any confusion. 

Additional info:

Comment 3 RHEL Program Management 2023-09-21 18:19:38 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 4 RHEL Program Management 2023-09-21 18:34:48 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.