Skip to content

Fix a segfault in TextLog_Print() by using %d for classification ID, as it's a 'uint32_t'. #68

Merged
merged 1 commit into from Feb 7, 2013

3 participants

@reedloden

No description provided.

@reedloden
(gdb) bt full
#0  0x00007ffff6cfb3b1 in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x00007ffff6d23442 in vsnprintf () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x0000000000444f33 in TextLog_Print (this=0x6be4d0, fmt=0x449580 "[Classification ID: %s] [Priority ID: %d] ") at sf_textlog.c:215
        avail = 4020
        len = 4513238
        ap = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fffffffde60, reg_save_area = 0x7fffffffdd90}}
#3  0x00000000004126a8 in LogPriorityData (log=0x6be4d0, classification_id=4, priority_id=2, doNewLine=0) at log_text.c:94
        cn = 0x0
#4  0x0000000000428e20 in AlertFast (p=0x6f8160, event=0x6f7dc0, event_type=7, arg=0x6bdb70) at spo_alert_fast.c:199
        data = 0x6bdb70
        sn = 0x6f80b0
#5  0x000000000041d969 in CallOutputPlugins (out_type=OUTPUT_TYPE__SPECIAL, packet=0x6f8160, event=0x6f7dc0, event_type=7) at plugbase.c:566
        idx = 0x6bdbd0
#6  0x000000000041ebf3 in spoolerProcessRecord (spooler=0x6bf510, fire_output=1) at spooler.c:701
        event_id = 41939
        pkth = {ts = {tv_sec = 1360041619, tv_usec = 638257}, caplen = 74, len = 74}
        type = 2
        ernCache = 0x6f8080
#7  0x000000000041e731 in ProcessContinuous (dirpath=0x6bcacc "/var/log/barnyard2", filebase=0x6bcecc "unified2.alert", record_start=0, timestamp=1359020742) at spooler.c:533
        spooler = 0x6bf510
        ret = 0
        pc_ret = 0
        new_file_available = 0
        waiting_logged = 0
        skipped = 0
        extension = 1359020741
        waldo_timestamp = 1359020741
#8  0x000000000041e956 in ProcessContinuousWithWaldo (waldo=0x6bc6c4) at spooler.c:621
No locals.
#9  0x0000000000403d62 in Barnyard2Main (argc=14, argv=0x7fffffffe178) at barnyard2.c:374
No locals.
#10 0x0000000000403b8a in main (argc=14, argv=0x7fffffffe178) at barnyard2.c:285
No locals.
@binf
Collaborator
binf commented Feb 7, 2013
@firnsy firnsy merged commit dfc81fa into firnsy:master Feb 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.