Ticket #3537: 0001-isofs-fix-incorrect-awk-comparison-operator.patch

File 0001-isofs-fix-incorrect-awk-comparison-operator.patch, 1.0 KB (added by vda, 9 years ago)

SEMICOLON == "YES" fix

  • src/vfs/extfs/helpers/iso9660.in

    From aa397f0091d0e626f7ee3ec66db954c0b78c6806 Mon Sep 17 00:00:00 2001
    From: Denys Vlasenko <vda.linux@googlemail.com>
    Subject: [PATCH] isofs: fix incorrect awk comparison operator
    
    SEMICOLON = "YES" is not a correct comparison op (should use ==),
    it's assignment! As a result, sub(";1$", "", name) was always executed.
    
    Untested - I have no idea when SEMICOLON is not "YES"
    
    Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>.
    ---
     src/vfs/extfs/helpers/iso9660.in | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/vfs/extfs/helpers/iso9660.in b/src/vfs/extfs/helpers/iso9660.in
    index a7c891c..a06b732 100644
    a b BEGIN { 
    153153  sub("^----------   0    0    0", "-r--r--r--   1 root root", attr) 
    154154  sub(" $", "", name) 
    155155  # for Joliet UCS level 3 
    156   if (SEMICOLON = "YES") sub(";1$", "", name); 
     156  if (SEMICOLON == "YES") sub(";1$", "", name); 
    157157  ## sub(";[0-9]+$", "", name) ## would break copyout 
    158158  # skip . and .. 
    159159  if (name == ".") next;