lkml.org 
[lkml]   [2004]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] ALSA: Remove subsystem-specific malloc (1/8)
    From
    Date

    > + */
    > +void *kcalloc(size_t n, size_t size, int flags)
    > +{
    > + void *ret = kmalloc(n * size, flags);

    how about making sure n*size doesn't overflow an int in this function?
    We had a few security holes due to that happening a while ago; might as
    well prevent it from happening entirely
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2005-03-22 14:03    [W:0.021 / U:0.356 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site