Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



On Nov 19, 2011, at 5:11 PM, Christos Zoulas wrote:

> Module Name:  src
> Committed By: christos
> Date:         Sat Nov 19 16:11:24 UTC 2011
> 
> Modified Files:
>       src/sys/kern: cnmagic.c
> 
> Log Message:
> PR/45633: Christian Biere: Don't access byte after NUL when setting magic.

This cannot work:

        if (c == '\0')
                return EINVAL;
        switch (c) {
        case '\0':
                ...
                return 0;       <== This statement looks unreachable.

All attempts to set cnmagic result in EINVAL.

--
Juergen Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig 
(Germany)



Home | Main Index | Thread Index | Old Index