~ubuntu-branches/ubuntu/raring/suricata/raring

« back to all changes in this revision

Viewing changes to src/detect-id.c

  • Committer: Package Import Robot
  • Author(s): Pierre Chifflier
  • Date: 2012-12-14 00:02:51 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20121214000251-3326bvmr1x6ofsy5
Tags: 1.4-1
* Imported Upstream version 1.4
* Enable Jansson and LuaJIT support, and add libjansson-dev libluajit-5.1-dev
  to build-deps
* Add python to recommends, for the suricatasc script
* Create /var/run/suricata directory when starting daemon

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 */
60
60
void DetectIdRegister (void) {
61
61
    sigmatch_table[DETECT_ID].name = "id";
 
62
    sigmatch_table[DETECT_ID].desc = "match on a specific IP ID value";
 
63
    sigmatch_table[DETECT_ID].url = "https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Header_keywords#Id";
62
64
    sigmatch_table[DETECT_ID].Match = DetectIdMatch;
63
65
    sigmatch_table[DETECT_ID].Setup = DetectIdSetup;
64
66
    sigmatch_table[DETECT_ID].Free  = DetectIdFree;
161
163
 
162
164
        /* We have a correct id option */
163
165
        id_d = SCMalloc(sizeof(DetectIdData));
164
 
        if (id_d == NULL)
 
166
        if (unlikely(id_d == NULL))
165
167
            goto error;
166
168
 
167
169
        orig = SCStrdup((char*)str_ptr);
 
170
        if (unlikely(orig == NULL)) {
 
171
            goto error;
 
172
        }
168
173
        tmp_str=orig;
169
 
        if (tmp_str == NULL) {
170
 
            goto error;
171
 
        }
172
174
 
173
175
        /* Let's see if we need to scape "'s */
174
176
        if (tmp_str[0] == '"')