• Wei Chen's avatar
    fbdev: nvidia: Fix potential divide by zero · 92e2a00f
    Wei Chen authored
    variable var->pixclock can be set by user. In case it
    equals to zero, divide by zero would occur in nvidiafb_set_par.
    
    Similar crashes have happened in other fbdev drivers. There
    is no check and modification on var->pixclock along the call
    chain to nvidia_check_var and nvidiafb_set_par. We believe it
    could also be triggered in driver nvidia from user site.
    Signed-off-by: default avatarWei Chen <harperchen1110@gmail.com>
    Signed-off-by: default avatarHelge Deller <deller@gmx.de>
    92e2a00f
nvidia.c 38.7 KB