1. 01 Jul, 2022 1 commit
  2. 30 Jun, 2022 1 commit
  3. 20 Jun, 2022 1 commit
  4. 19 Jun, 2022 1 commit
  5. 17 Jun, 2022 2 commits
  6. 15 Jun, 2022 2 commits
  7. 11 Jun, 2022 1 commit
  8. 08 Jun, 2022 1 commit
  9. 31 May, 2022 1 commit
  10. 03 May, 2022 3 commits
  11. 02 May, 2022 1 commit
  12. 28 Apr, 2022 1 commit
  13. 19 Apr, 2022 1 commit
  14. 08 Apr, 2022 1 commit
  15. 06 Apr, 2022 3 commits
  16. 01 Apr, 2022 1 commit
  17. 30 Mar, 2022 2 commits
  18. 29 Mar, 2022 2 commits
  19. 26 Mar, 2022 1 commit
    • Celine Lee's avatar
      Modify casting in protection against underflow (#1514) · 9789069c
      Celine Lee authored
      Dear Ventoy community –
       
      Our team is working with your code and we noticed this if logical expression:
       
                      if (len - 1 - (int)(long)(pos - pwdstr) != 32)
       
      We studied the surrounding code. We believe we understand the intention of the type casts in the above if statement. It seems they were meant to ensure an underflow doesn’t occur by the subtraction between to char pointers, which is a great catch (!). However, we believe the way the type casts are structured, the code is not actually protecting against such underflow because pwdstr isn’t cast into a signed long until after the subtraction occurs. To properly protect this code against underflow, we believe it should be changed to something like the following:
      
      if (len - 1 - ((long)pos – (long)pwdstr) != 32)
      
      Or, to enhance readability for junior engineers who may not know that the “long” type cast is implicitly of a signed integer type, we could include the `signed` keyword for added verbosity:
       
      if (len - 1 - ((signed long)pos – (signed long)pwdstr) != 32)
       
      Thank you!
      9789069c
  20. 08 Mar, 2022 2 commits
  21. 06 Mar, 2022 1 commit
  22. 22 Feb, 2022 1 commit
  23. 15 Feb, 2022 5 commits
  24. 14 Feb, 2022 2 commits
  25. 13 Feb, 2022 1 commit
  26. 05 Feb, 2022 1 commit