• unknown's avatar
    Bug #28984: crasher on connect with out of range password length in \ · c1585aea
    unknown authored
    	protocol
    
    One could send a malformed packet that caused the server to SEGV.  In 
    recent versions of the password protocol, the client tells the server 
    what length the ciphertext is (almost always 20).  If that length was
    large enough to overflow a signed char, then the number would jump to 
    very large after being casted to unsigned int.
    
    Instead, cast the *passwd char to uchar. 
    
    
    
    sql/sql_parse.cc:
      Cast *passwd to get rid of the sign, so that sign extension doesn't
      cause the sequence 125, 126, 127, 4294967169, 4294967170.
    c1585aea
sql_parse.cc 172 KB