• Tero Kristo's avatar
    crypto: omap-sham - buffer handling fixes for hashing later · 5d78d57e
    Tero Kristo authored
    Currently, the hash later code only handles the cases when we have
    either new data coming in with the request or old data in the buffer,
    but not the combination when we have both. Fix this by changing the
    ordering of the code a bit and handling both cases properly
    simultaneously if needed. Also, fix an issue with omap_sham_update
    that surfaces with this fix, so that the code checks the bufcnt
    instead of total data amount against buffer length to avoid any
    buffer overflows.
    Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    5d78d57e
omap-sham.c 52.1 KB