• Georgi Kodinov's avatar
    Bug #35087: Inserting duplicate values at one time with DES_ENCRYPT leads · 4783b2e1
    Georgi Kodinov authored
      to wrong results
          
    3 problems found with DES_ENCRYPT/DES_DECRYPT :
    
    1. The max length was not calculated properly. Fixed in fix_length_and_dec()
    2. DES_ENCRYPT had a side effect of sometimes reallocating and changing 
    the value of its argument. Fixed by explicitly pre-allocating the necessary
    space to pad the argument with trailing '*' (stars) when calculating the 
    DES digest.
    3. in DES_ENCRYPT the string buffer for the result value was not 
    reallocated to the correct size and only string length was assigned to it. 
    Fixed by making sure there's enough space to hold the result.
    4783b2e1
item_strfunc.h 22.8 KB