diff --git a/xCAT-server/lib/perl/xCAT/IPMI.pm b/xCAT-server/lib/perl/xCAT/IPMI.pm index 7ad8604ad..16535e104 100644 --- a/xCAT-server/lib/perl/xCAT/IPMI.pm +++ b/xCAT-server/lib/perl/xCAT/IPMI.pm @@ -436,6 +436,9 @@ sub cbc_pad { } elsif ($mode eq 'd') { my @block = unpack("C*",$block); my $count = pop @block; + unless ($count) { + return pack("C*",@block); + } splice @block,0-$count; return pack("C*",@block); }