Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
message_validator.h File Reference

Network message validation for buffer overflow prevention. More...

#include <cstdint>
#include <cstddef>
#include <cstring>
#include <string>
#include <string_view>
#include <stdexcept>
#include <algorithm>
Include dependency graph for message_validator.h:

Go to the source code of this file.

Classes

struct  kcenon::network::message_limits
 Configurable message size limits. More...
 
class  kcenon::network::message_validator
 Message validator for network input validation. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::network
 Main namespace for all Network System components.
 

Enumerations

enum class  kcenon::network::validation_result {
  kcenon::network::ok , kcenon::network::size_exceeded , kcenon::network::null_byte_detected , kcenon::network::invalid_format ,
  kcenon::network::invalid_character , kcenon::network::header_count_exceeded
}
 Result type for validation operations. More...
 

Functions

const char * kcenon::network::to_string (validation_result result)
 Convert validation result to string.
 

Detailed Description

Network message validation for buffer overflow prevention.

Provides input validation utilities to prevent buffer overflow attacks and other input-based vulnerabilities (CWE-119, CWE-20).

Security features:

  • Message size limits to prevent memory exhaustion
  • Safe buffer copy operations
  • HTTP header validation
  • WebSocket frame validation
  • NULL byte injection prevention

Definition in file message_validator.h.