Skip to content
Snippets Groups Projects
  1. Oct 30, 2019
  2. Oct 11, 2019
  3. Jul 22, 2019
  4. Jul 12, 2019
    • Tobias Stoeckmann's avatar
      Check stat for error before setting permissions. · 2c38c9da
      Tobias Stoeckmann authored
      
      When setting wallpapers without --no-fehbg option, a ~/.fehbg file is
      created. This file is set to be an executable for later re-use.
      
      Calling stat() without checking the return value can lead to issues.
      If the call fails, then s.st_mode is undefined and excessive permissions
      could be set to .fehbg, at worst even setuid/setgid bits for a world
      writable file.
      
      While adjusting this, I changed the code to use fstat() and fchmod() to
      avoid a further -- but very unlikely -- issue: race condition in form of
      TOCTOU. If the file ~/.fehsetbg is replaced by a symlink right before
      the chmod call, then a different file would be set executable + the
      default mode of the (newly created) file. I don't expect this to be a
      real world issue but changed this part "while at it" anyway for more
      robust code and a good example on how to handle files.
      
      Signed-off-by: default avatarTobias Stoeckmann <tobias@stoeckmann.org>
      2c38c9da
  5. Jul 08, 2019
  6. Apr 18, 2019
  7. Apr 12, 2019
  8. Apr 05, 2019
  9. Mar 26, 2019
  10. Mar 15, 2019
  11. Mar 14, 2019
  12. Feb 14, 2019
  13. Feb 11, 2019
  14. Feb 08, 2019
  15. Feb 01, 2019
  16. Jan 21, 2019
    • guraga's avatar
      Update "src/signals.h" · fa10dc1e
      guraga authored
      Use "extern volatile" instead of "volatile extern" to avoid "gcc" warning "'extern' is not at beginning of declaration [-Wold-style-declaration]".
      fa10dc1e
  17. Dec 23, 2018
  18. Dec 22, 2018
  19. Dec 04, 2018
  20. Nov 29, 2018
  21. Nov 23, 2018
  22. Nov 19, 2018
    • Birte Kristina Friesel's avatar
      --start-at: Auto-load directory when no other files are specified · 391a9bfd
      Birte Kristina Friesel authored
      This changes the behaviour of "feh --start-at FILENAME" as follows:
      
      Previously, this would cause feh to load all files in the current
      working directory, since no files or filelists were specified on the command
      line.
      
      Now this is a special case: feh will extract the directory component from
      FILENAME, load all files in that directory, and display FILENAME.
      This way, it's possible to use "feh --start-at ~%f" in XDG Desktop files
      and browse files in feh using the prev/next keys
      
      Closes #372
      Closes #420
      391a9bfd
  23. Nov 18, 2018
  24. Nov 09, 2018
  25. Nov 08, 2018
  26. Nov 05, 2018
  27. Nov 04, 2018
  28. Oct 17, 2018
    • Birte Kristina Friesel's avatar
      Use random() instead of rand() to increase portability · 9803fc41
      Birte Kristina Friesel authored
      Quoting glibc rand(3):
      
      The  versions  of rand() and srand() in the Linux C Library use the same random
      number generator as random(3) and srandom(3), so the lower-order bits should be
      as  random  as  the  higher-order bits.   However,  on  older  rand()
      implementations, and on current implementations on different systems, the
      lower-order bits are much less random than the higher-order bits.  Do not use
      this function in applications intended to be portable when good randomness is
      needed.  (Use random(3) instead.)
      9803fc41
Loading