Skip to content

cksum: Check --length before --check #7050

@RenjiSann

Description

@RenjiSann

(Found with fuzzer)

args: ["cksum", "-l", "158", "-c", "-a", "crc", "/tmp/shlsgiqaxn"]                                                                                                                                                                                                                          
Running test ["cksum", "-l", "158", "-c", "-a", "crc", "/tmp/shlsgiqaxn"]                                                                                                                                                                                                                   
Test Type: cksum                                                                                                                                                                                                                                                                            
Input: ["-l", "158", "-c", "-a", "crc", "/tmp/shlsgiqaxn"]                                                                                                                                                                                                                                  
Rust stderr: --check is not supported with --algorithm={bsd,sysv,crc}                                                                                                                                                                                                                       
GNU stderr: --length is only supported with --algorithm=blake2b                                                                                                                                                                                                                             
Diff=                                                                                                                                                                                                                                                                                       
---check is not supported with --algorithm={bsd,sysv,crc}                                                                                                                                                                                                                                   
+--length is only supported with --algorithm=blake2b                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                            
Discrepancy detected: stderr differs                                                                                                                                                                                                                                                        
Test completed with discrepancies for cksum: ["-l", "158", "-c", "-a", "crc", "/tmp/shlsgiqaxn"]

Basically, cksum should check that --length is allowed before checking if --check is.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions