HTP  0.5
Functions
htp_utf8_decoder.c File Reference
#include "htp_config_auto.h"
#include "htp_private.h"

Functions

uint32_t htp_utf8_decode (uint32_t *state, uint32_t *codep, uint32_t byte)
 
uint32_t htp_utf8_decode_allow_overlong (uint32_t *state, uint32_t *codep, uint32_t byte)
 

Detailed Description

Author
Ivan Ristic ivanr.nosp@m.@web.nosp@m.kreat.nosp@m.or.c.nosp@m.om

Function Documentation

uint32_t htp_utf8_decode ( uint32_t *  state,
uint32_t *  codep,
uint32_t  byte 
)

Process one byte of UTF-8 data and return a code point if one is available.

Parameters
[in]state
[in]codep
[in]byte
Returns
HTP_UTF8_ACCEPT for a valid character, HTP_UTF8_REJECT for an invalid character, or something else if the character has not yet been formed
uint32_t htp_utf8_decode_allow_overlong ( uint32_t *  state,
uint32_t *  codep,
uint32_t  byte 
)

Process one byte of UTF-8 data and return a code point if one is available. Allows overlong characters in input.

Parameters
[in]state
[in]codep
[in]byte
Returns
HTP_UTF8_ACCEPT for a valid character, HTP_UTF8_REJECT for an invalid character, or something else if the character has not yet been formed