Hi folks,

while writing an open_capture_file() function for lua I came up with
an odd situation.

When executing the following code more than once, during the cf_read
call the stack gets overwritten.

        if (cf_open(&cfile, fname, FALSE, &err) != CF_OK) {
                return FALSE;
        }
        cfile.rfcode = rfcode;
        
        switch (cf_read(&cfile)) {
                case CF_READ_OK:
                case CF_READ_ERROR:
                        break;
                default:
                        return FALSE;
        }

overwriting happens when calling wtap_read() from file.c:405

I tried to understand why this happens but nothing appears to me to be
the cause.

Is there something I should do before calling cf_open() to avoid this happening.

Thanks,
Luis


-- 
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan
_______________________________________________
Wireshark-dev mailing list
[email protected]
http://www.wireshark.org/mailman/listinfo/wireshark-dev

Reply via email to