~ubuntu-branches/ubuntu/vivid/libhtp/vivid-proposed

« back to all changes in this revision

Viewing changes to htp/htp_parsers.c

  • Committer: Package Import Robot
  • Author(s): Pierre Chifflier
  • Date: 2012-11-03 09:23:06 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20121103092306-1mlez1c0xf0ic8t8
Tags: 0.2.10-1
* Imported Upstream version 0.2.10
* Update watch file
* Update symbols file
* Bump Standards Version
* Convert to DH 9
  - add multiarch support
  - fully enable hardening flags
* Debian release 0.2.10-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 * @return Protocol version or PROTOCOL_UKNOWN.
24
24
 */
25
25
int htp_parse_protocol(bstr *protocol) {
26
 
    if (bstr_len(protocol) == 8) {
 
26
    if (protocol != NULL && bstr_len(protocol) == 8) {
27
27
        char *ptr = bstr_ptr(protocol);
28
28
        if ((ptr[0] == 'H') && (ptr[1] == 'T') && (ptr[2] == 'T') && (ptr[3] == 'P')
29
29
            && (ptr[4] == '/') && (ptr[6] == '.')) {