Skip to content
  • Nick Mathewson's avatar
    Fix spurious compiler warning in do_getpass(). · 7026b607
    Nick Mathewson authored
    Some compilers apparently noticed that p2len was allowed to be equal
    to msg, and so maybe we would be doing memset(prompt2, ' ', 0), and
    decided that we probably meant to do memset(prompt2, 0, 0x20);
    instead.
    
    Stupid compilers, doing optimization before this kind of warning!
    
    My fix is to just fill the entire prompt2 buffer with spaces,
    because it's harmless.
    
    Bugfix on e59f0d4c, not in any released Tor.
    7026b607