Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix buffer overflow in wcstombs_s() function #59

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Set SFL_MAX_HOSTNAME_CHARS to 255 according to RFC1035
# Conflicts:
#	src/sflow/sflow.h
  • Loading branch information
dhmhd committed Dec 4, 2023
commit a7412ed5f0c66e03172adfe02f0dd95d758885c4
11 changes: 10 additions & 1 deletion src/sflow/sflow.h
Original file line number Diff line number Diff line change
@@ -839,7 +839,16 @@ typedef struct _SFLHost_par_counters {
uint32_t dsIndex; /* sFlowDataSource index */
} SFLHost_par_counters;

#define SFL_MAX_HOSTNAME_CHARS 64
/*
* From RFC1035
*
* 2.3.4. Size limits
* names 255 octets or less
*
* 3.1. Name space definitions
* To simplify implementations, the total length of a domain name (i.e., label octets and label length octets) is restricted to 255 octets or less.
*/
#define SFL_MAX_HOSTNAME_CHARS 255
#define SFL_MAX_OSRELEASE_CHARS 32

typedef struct _SFLHost_hid_counters {