Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cksum: Investigate the display strategy of valid UTF-8 but non-ASCII filenames #7056

Open
RenjiSann opened this issue Jan 2, 2025 · 0 comments

Comments

@RenjiSann
Copy link
Contributor

(Found with fuzzer)

args: ["cksum", "file_rIÃ", "file_pGB(e"]                                                                                                     
Running test ["cksum", "file_rIÃ", "file_pGB(e"]                                                                                              
Test Type: cksum                                                                                                                              
Input: ["file_rIÃ", "file_pGB(e"]                                                                                                             
Rust stderr: file_rIÃ: No such file or directory                                                                                              
cksum: file_pGB(e: No such file or directory                                                                                                  
GNU stderr: 'file_rI'$'\303\203': No such file or directory                                                                                   
cksum: 'file_pGB(e': No such file or directory                                                                                                
Diff=                                                                                                                                         
-file_rIÃ: No such file or directory                                                                                                          
-cksum: file_pGB(e: No such file or directory                                                                                                 
+'file_rI'$'\303\203': No such file or directory                                                                                              
+cksum: 'file_pGB(e': No such file or directory                                                                                               
                                                                                                                                              
Discrepancy detected: stderr differs                                                                                                          
Test completed with discrepancies for cksum: ["file_rIÃ", "file_pGB(e"] 

3 things here :

  • The Ä should be escaped, even so it is a valid UTF8 character.
  • The first line doesn't get the cksum: prefix
  • We also forget to quote the filename with )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants