** Description changed:

+ ================================
+ Bug Status 21st July '06 by T. Six:
+ Fix in Ubuntu package has been released
+ Bug has been reported upstream (Debian), upstream hasnĀ“t answered yet.
+ ================================
+ 
+ 
  On mistyping `cd' and `dc', dc doesn't complain so it's more likely I
  don't notice.
  
      $ dc tmp
      $ rm -f *
      $ cd ..
      $ rmdir tmp
      rmdir: `tmp': No such file or directory
      $ #@&%*!
  
  Not only is it silent, but it thinks all went well.
  
      $ dc /; echo $?
      0
      $ dc / 2>&1 | wc -c
      0
  
  It's because bc-1.06/dc/eval.c assumes getc() returning EOF means end of
  file.  It can also mean `error' and feof() or ferror() should be used to
  find out which is the case.
  
      int
      dc_evalfile DC_DECLARG((fp))
          FILE *fp DC_DECLEND
      {
          ...
          for (c=getc(fp); c!=EOF; c=peekc){
              ...
          }
          return DC_SUCCESS;
      }
  
  The getc() in dc_readstring() may also need attention.

-- 
dc doesn't consider a directory an error, e.g. `dc /'.
https://launchpad.net/bugs/18917

--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to