forked from osmocom/wireshark
Cast away the return value of g_strlcpy() and g_strlcat().
Most of the time, the return value tells us nothing useful, as we've already decided that we're perfectly willing to live with string truncation. Hopefully this keeps Coverity from whining that those routines could return an error code (NARRATOR: They don't) and thus that we're ignoring the possibility of failure (as indicated, we've already decided that we can live with string truncation, so truncation is *NOT* a failure).
This commit is contained in:
parent
0914739700
commit
57a1514ac7
|
@ -1820,9 +1820,9 @@ main(int argc, char *argv[])
|
|||
|
||||
for (opt = optind; opt < argc; opt++) {
|
||||
|
||||
g_strlcpy(file_sha256, "<unknown>", HASH_STR_SIZE);
|
||||
g_strlcpy(file_rmd160, "<unknown>", HASH_STR_SIZE);
|
||||
g_strlcpy(file_sha1, "<unknown>", HASH_STR_SIZE);
|
||||
(void) g_strlcpy(file_sha256, "<unknown>", HASH_STR_SIZE);
|
||||
(void) g_strlcpy(file_rmd160, "<unknown>", HASH_STR_SIZE);
|
||||
(void) g_strlcpy(file_sha1, "<unknown>", HASH_STR_SIZE);
|
||||
|
||||
if (cap_file_hashes) {
|
||||
fh = ws_fopen(argv[opt], "rb");
|
||||
|
|
|
@ -292,7 +292,7 @@ if_info_get(const char *name)
|
|||
* Get the description for the interface.
|
||||
*/
|
||||
memset(&ifrdesc, 0, sizeof ifrdesc);
|
||||
g_strlcpy(ifrdesc.ifr_name, name, sizeof ifrdesc.ifr_name);
|
||||
(void) g_strlcpy(ifrdesc.ifr_name, name, sizeof ifrdesc.ifr_name);
|
||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (s >= 0) {
|
||||
#ifdef __FreeBSD__
|
||||
|
@ -1138,7 +1138,7 @@ is_linux_bonding_device(const char *ifname)
|
|||
return FALSE;
|
||||
|
||||
memset(&ifr, 0, sizeof ifr);
|
||||
g_strlcpy(ifr.ifr_name, ifname, sizeof ifr.ifr_name);
|
||||
(void) g_strlcpy(ifr.ifr_name, ifname, sizeof ifr.ifr_name);
|
||||
memset(&ifb, 0, sizeof ifb);
|
||||
ifr.ifr_data = (caddr_t)&ifb;
|
||||
#if defined(SIOCBONDINFOQUERY)
|
||||
|
@ -1329,7 +1329,7 @@ open_capture_device_pcap_create(
|
|||
*/
|
||||
if (status == PCAP_ERROR) {
|
||||
*open_err = CAP_DEVICE_OPEN_ERR_NOT_PERMISSIONS;
|
||||
g_strlcpy(*open_err_str, pcap_geterr(pcap_h),
|
||||
(void) g_strlcpy(*open_err_str, pcap_geterr(pcap_h),
|
||||
sizeof *open_err_str);
|
||||
pcap_close(pcap_h);
|
||||
return NULL;
|
||||
|
@ -1353,14 +1353,14 @@ open_capture_device_pcap_create(
|
|||
/* Failed to activate, set to NULL */
|
||||
if (status == PCAP_ERROR) {
|
||||
*open_err = CAP_DEVICE_OPEN_ERR_GENERIC;
|
||||
g_strlcpy(*open_err_str, pcap_geterr(pcap_h),
|
||||
(void) g_strlcpy(*open_err_str, pcap_geterr(pcap_h),
|
||||
sizeof *open_err_str);
|
||||
} else {
|
||||
if (status == PCAP_ERROR_PERM_DENIED)
|
||||
*open_err = CAP_DEVICE_OPEN_ERR_PERMISSIONS;
|
||||
else
|
||||
*open_err = CAP_DEVICE_OPEN_ERR_NOT_PERMISSIONS;
|
||||
g_strlcpy(*open_err_str, pcap_statustostr(status),
|
||||
(void) g_strlcpy(*open_err_str, pcap_statustostr(status),
|
||||
sizeof *open_err_str);
|
||||
}
|
||||
pcap_close(pcap_h);
|
||||
|
@ -1592,7 +1592,7 @@ open_capture_device(capture_options *capture_opts,
|
|||
* no error message is filled in on a
|
||||
* failure to open an rpcap: URL.
|
||||
*/
|
||||
g_strlcpy(*open_err_str,
|
||||
(void) g_strlcpy(*open_err_str,
|
||||
"Unknown error (pcap bug; actual error cause not reported)",
|
||||
sizeof *open_err_str);
|
||||
}
|
||||
|
|
|
@ -466,7 +466,7 @@ static int get_freq_wext(const char *ifname)
|
|||
if (fd == -1)
|
||||
return -1;
|
||||
|
||||
g_strlcpy(wrq.name1, ifname, IFNAMSIZ);
|
||||
(void) g_strlcpy(wrq.name1, ifname, IFNAMSIZ);
|
||||
/* SIOCGIWFREQ */
|
||||
if (ioctl(fd, 0x8B05, &wrq) == 0) {
|
||||
if (wrq.e == 6)
|
||||
|
@ -699,7 +699,7 @@ static int ws80211_iface_up(const char *ifname)
|
|||
if (sock == -1)
|
||||
return -1;
|
||||
|
||||
g_strlcpy(ifreq.ifr_name, ifname, sizeof(ifreq.ifr_name));
|
||||
(void) g_strlcpy(ifreq.ifr_name, ifname, sizeof(ifreq.ifr_name));
|
||||
|
||||
if (ioctl(sock, SIOCGIFFLAGS, &ifreq))
|
||||
goto out_err;
|
||||
|
|
|
@ -2154,7 +2154,7 @@ main(int argc, char *argv[])
|
|||
|
||||
if (err_type < ERR_WT_FMT) {
|
||||
if ((unsigned int)i < caplen - 2)
|
||||
g_strlcpy((char*) &buf[i], "%s", 2);
|
||||
(void) g_strlcpy((char*) &buf[i], "%s", 2);
|
||||
err_type = ERR_WT_TOTAL;
|
||||
} else {
|
||||
err_type -= ERR_WT_FMT;
|
||||
|
|
|
@ -1021,7 +1021,7 @@ static void
|
|||
fill_dummy_ip6(hashipv6_t* volatile tp)
|
||||
{
|
||||
/* Overwrite if we get async DNS reply */
|
||||
g_strlcpy(tp->name, tp->ip6, MAXNAMELEN);
|
||||
(void) g_strlcpy(tp->name, tp->ip6, MAXNAMELEN);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1457,14 +1457,14 @@ parse_ether_line(char *line, ether_t *eth, unsigned int *mask,
|
|||
if ((cp = strtok(NULL, " \t")) == NULL)
|
||||
return -1;
|
||||
|
||||
g_strlcpy(eth->name, cp, MAXNAMELEN);
|
||||
(void) g_strlcpy(eth->name, cp, MAXNAMELEN);
|
||||
|
||||
if ((cp = strtok(NULL, "\t")) != NULL)
|
||||
{
|
||||
g_strlcpy(eth->longname, cp, MAXNAMELEN);
|
||||
(void) g_strlcpy(eth->longname, cp, MAXNAMELEN);
|
||||
} else {
|
||||
/* Make the long name the short name */
|
||||
g_strlcpy(eth->longname, eth->name, MAXNAMELEN);
|
||||
(void) g_strlcpy(eth->longname, eth->name, MAXNAMELEN);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1550,13 +1550,13 @@ manuf_hash_new_entry(const guint8 *addr, char* name, char* longname)
|
|||
|
||||
memcpy(manuf_value->addr, addr, 3);
|
||||
if (name != NULL) {
|
||||
g_strlcpy(manuf_value->resolved_name, name, MAXNAMELEN);
|
||||
(void) g_strlcpy(manuf_value->resolved_name, name, MAXNAMELEN);
|
||||
manuf_value->status = HASHETHER_STATUS_RESOLVED_NAME;
|
||||
if (longname != NULL) {
|
||||
g_strlcpy(manuf_value->resolved_longname, longname, MAXNAMELEN);
|
||||
(void) g_strlcpy(manuf_value->resolved_longname, longname, MAXNAMELEN);
|
||||
}
|
||||
else {
|
||||
g_strlcpy(manuf_value->resolved_longname, name, MAXNAMELEN);
|
||||
(void) g_strlcpy(manuf_value->resolved_longname, name, MAXNAMELEN);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1774,7 +1774,7 @@ eth_addr_resolve(hashether_t *tp) {
|
|||
const guint8 *addr = tp->addr;
|
||||
|
||||
if ( (eth = get_ethbyaddr(addr)) != NULL) {
|
||||
g_strlcpy(tp->resolved_name, eth->name, MAXNAMELEN);
|
||||
(void) g_strlcpy(tp->resolved_name, eth->name, MAXNAMELEN);
|
||||
tp->status = HASHETHER_STATUS_RESOLVED_NAME;
|
||||
return tp;
|
||||
} else {
|
||||
|
@ -1907,7 +1907,7 @@ add_eth_name(const guint8 *addr, const gchar *name)
|
|||
}
|
||||
|
||||
if (strcmp(tp->resolved_name, name) != 0) {
|
||||
g_strlcpy(tp->resolved_name, name, MAXNAMELEN);
|
||||
(void) g_strlcpy(tp->resolved_name, name, MAXNAMELEN);
|
||||
tp->status = HASHETHER_STATUS_RESOLVED_NAME;
|
||||
new_resolved_objects = TRUE;
|
||||
}
|
||||
|
@ -1981,7 +1981,7 @@ parse_ipxnets_line(char *line, ipxnet_t *ipxnet)
|
|||
ipxnet->addr = (a0 << 24) | (a1 << 16) | (a2 << 8) | a3;
|
||||
}
|
||||
|
||||
g_strlcpy(ipxnet->name, cp, MAXNAMELEN);
|
||||
(void) g_strlcpy(ipxnet->name, cp, MAXNAMELEN);
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -2111,7 +2111,7 @@ ipxnet_name_lookup(wmem_allocator_t *allocator, const guint addr)
|
|||
g_snprintf(tp->name, MAXNAMELEN, "%X", addr);
|
||||
|
||||
} else {
|
||||
g_strlcpy(tp->name, ipxnet->name, MAXNAMELEN);
|
||||
(void) g_strlcpy(tp->name, ipxnet->name, MAXNAMELEN);
|
||||
}
|
||||
|
||||
return wmem_strdup(allocator, tp->name);
|
||||
|
@ -2141,7 +2141,7 @@ parse_vlan_line(char *line, vlan_t *vlan)
|
|||
if ((cp = strtok(NULL, "\t\n")) == NULL)
|
||||
return -1;
|
||||
|
||||
g_strlcpy(vlan->name, cp, MAXVLANNAMELEN);
|
||||
(void) g_strlcpy(vlan->name, cp, MAXVLANNAMELEN);
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -2255,7 +2255,7 @@ vlan_name_lookup(const guint id)
|
|||
g_snprintf(tp->name, MAXVLANNAMELEN, "<%u>", id);
|
||||
|
||||
} else {
|
||||
g_strlcpy(tp->name, vlan->name, MAXVLANNAMELEN);
|
||||
(void) g_strlcpy(tp->name, vlan->name, MAXVLANNAMELEN);
|
||||
}
|
||||
|
||||
return tp->name;
|
||||
|
@ -2363,7 +2363,7 @@ add_ip_name_from_string (const char *addr, const char *name)
|
|||
if (resolved_entry)
|
||||
{
|
||||
// If we found a previous matching key (IP address), then just update the value (custom hostname);
|
||||
g_strlcpy(resolved_entry->name, name, MAXNAMELEN);
|
||||
(void) g_strlcpy(resolved_entry->name, name, MAXNAMELEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2372,7 +2372,7 @@ add_ip_name_from_string (const char *addr, const char *name)
|
|||
memcpy(addr_key, &host_addr.ip6_addr, sizeof(ws_in6_addr));
|
||||
|
||||
resolved_entry = wmem_new(wmem_epan_scope(), resolved_name_t);
|
||||
g_strlcpy(resolved_entry->name, name, MAXNAMELEN);
|
||||
(void) g_strlcpy(resolved_entry->name, name, MAXNAMELEN);
|
||||
|
||||
wmem_map_insert(manually_resolved_ipv6_list, addr_key, resolved_entry);
|
||||
}
|
||||
|
@ -2381,13 +2381,13 @@ add_ip_name_from_string (const char *addr, const char *name)
|
|||
if (resolved_entry)
|
||||
{
|
||||
// If we found a previous matching key (IP address), then just update the value (custom hostname);
|
||||
g_strlcpy(resolved_entry->name, name, MAXNAMELEN);
|
||||
(void) g_strlcpy(resolved_entry->name, name, MAXNAMELEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add a new mapping entry, if this IP address isn't already in the list.
|
||||
resolved_entry = wmem_new(wmem_epan_scope(), resolved_name_t);
|
||||
g_strlcpy(resolved_entry->name, name, MAXNAMELEN);
|
||||
(void) g_strlcpy(resolved_entry->name, name, MAXNAMELEN);
|
||||
|
||||
wmem_map_insert(manually_resolved_ipv4_list, GUINT_TO_POINTER(host_addr.ip4_addr), resolved_entry);
|
||||
}
|
||||
|
@ -2610,7 +2610,7 @@ subnet_entry_set(guint32 subnet_addr, const guint8 mask_length, const gchar* nam
|
|||
|
||||
tp->next = NULL;
|
||||
tp->addr = subnet_addr;
|
||||
g_strlcpy(tp->name, name, MAXNAMELEN); /* This is longer than subnet names can actually be */
|
||||
(void) g_strlcpy(tp->name, name, MAXNAMELEN); /* This is longer than subnet names can actually be */
|
||||
have_subnet_entry = TRUE;
|
||||
}
|
||||
|
||||
|
@ -2686,7 +2686,7 @@ void fill_unresolved_ss7pc(const gchar * pc_addr, const guint8 ni, const guint32
|
|||
{
|
||||
hashss7pc_t *tp = host_lookup_ss7pc(ni, pc);
|
||||
|
||||
g_strlcpy(tp->pc_addr, pc_addr, MAXNAMELEN);
|
||||
(void) g_strlcpy(tp->pc_addr, pc_addr, MAXNAMELEN);
|
||||
}
|
||||
|
||||
const gchar *
|
||||
|
@ -2725,7 +2725,7 @@ add_ss7pc_name(const guint8 ni, guint32 pc, const gchar *name)
|
|||
}
|
||||
|
||||
if (g_ascii_strcasecmp(tp->name, name)) {
|
||||
g_strlcpy(tp->name, name, MAXNAMELEN);
|
||||
(void) g_strlcpy(tp->name, name, MAXNAMELEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3032,7 +3032,7 @@ add_ipv4_name(const guint addr, const gchar *name)
|
|||
}
|
||||
|
||||
if (g_ascii_strcasecmp(tp->name, name)) {
|
||||
g_strlcpy(tp->name, name, MAXNAMELEN);
|
||||
(void) g_strlcpy(tp->name, name, MAXNAMELEN);
|
||||
new_resolved_objects = TRUE;
|
||||
}
|
||||
tp->flags |= TRIED_RESOLVE_ADDRESS|NAME_RESOLVED;
|
||||
|
@ -3062,7 +3062,7 @@ add_ipv6_name(const ws_in6_addr *addrp, const gchar *name)
|
|||
}
|
||||
|
||||
if (g_ascii_strcasecmp(tp->name, name)) {
|
||||
g_strlcpy(tp->name, name, MAXNAMELEN);
|
||||
(void) g_strlcpy(tp->name, name, MAXNAMELEN);
|
||||
new_resolved_objects = TRUE;
|
||||
}
|
||||
tp->flags |= TRIED_RESOLVE_ADDRESS|NAME_RESOLVED;
|
||||
|
|
|
@ -390,7 +390,7 @@ static int fcwwn_name_res_len(void)
|
|||
******************************************************************************/
|
||||
static int stringz_addr_to_str(const address* addr, gchar *buf, int buf_len)
|
||||
{
|
||||
g_strlcpy(buf, (const gchar *)addr->data, buf_len);
|
||||
(void) g_strlcpy(buf, (const gchar *)addr->data, buf_len);
|
||||
return (int)(strlen(buf)+1);
|
||||
}
|
||||
|
||||
|
|
|
@ -304,13 +304,13 @@ col_clear(column_info *cinfo, const gint el)
|
|||
if (col_item->col_data != col_item->col_buf) { \
|
||||
/* This was set with "col_set_str()"; copy the string they \
|
||||
set it to into the buffer, so we can append to it. */ \
|
||||
g_strlcpy(col_item->col_buf, col_item->col_data, max_len); \
|
||||
(void) g_strlcpy(col_item->col_buf, col_item->col_data, max_len); \
|
||||
col_item->col_data = col_item->col_buf; \
|
||||
}
|
||||
|
||||
#define COL_CHECK_REF_TIME(fd, buf) \
|
||||
if (fd->ref_time) { \
|
||||
g_strlcpy(buf, "*REF*", COL_MAX_LEN ); \
|
||||
(void) g_strlcpy(buf, "*REF*", COL_MAX_LEN ); \
|
||||
return; \
|
||||
}
|
||||
|
||||
|
@ -490,7 +490,7 @@ col_do_append_fstr(column_info *cinfo, const int el, const char *separator, cons
|
|||
* If we have a separator, append it if the column isn't empty.
|
||||
*/
|
||||
if (sep_len != 0 && len != 0) {
|
||||
g_strlcat(col_item->col_buf, separator, max_len);
|
||||
(void) g_strlcat(col_item->col_buf, separator, max_len);
|
||||
len += sep_len;
|
||||
}
|
||||
|
||||
|
@ -567,7 +567,7 @@ col_prepend_fstr(column_info *cinfo, const gint el, const gchar *format, ...)
|
|||
/* This was set with "col_set_str()"; which is effectively const */
|
||||
orig = col_item->col_data;
|
||||
} else {
|
||||
g_strlcpy(orig_buf, col_item->col_buf, max_len);
|
||||
(void) g_strlcpy(orig_buf, col_item->col_buf, max_len);
|
||||
orig = orig_buf;
|
||||
}
|
||||
va_start(ap, format);
|
||||
|
@ -580,7 +580,7 @@ col_prepend_fstr(column_info *cinfo, const gint el, const gchar *format, ...)
|
|||
if (col_item->col_fence > 0)
|
||||
col_item->col_fence += (int) strlen(col_item->col_buf);
|
||||
|
||||
g_strlcat(col_item->col_buf, orig, max_len);
|
||||
(void) g_strlcat(col_item->col_buf, orig, max_len);
|
||||
col_item->col_data = col_item->col_buf;
|
||||
}
|
||||
}
|
||||
|
@ -610,7 +610,7 @@ col_prepend_fence_fstr(column_info *cinfo, const gint el, const gchar *format, .
|
|||
/* This was set with "col_set_str()"; which is effectively const */
|
||||
orig = col_item->col_data;
|
||||
} else {
|
||||
g_strlcpy(orig_buf, col_item->col_buf, max_len);
|
||||
(void) g_strlcpy(orig_buf, col_item->col_buf, max_len);
|
||||
orig = orig_buf;
|
||||
}
|
||||
va_start(ap, format);
|
||||
|
@ -626,7 +626,7 @@ col_prepend_fence_fstr(column_info *cinfo, const gint el, const gchar *format, .
|
|||
} else {
|
||||
col_item->col_fence = (int) strlen(col_item->col_buf);
|
||||
}
|
||||
g_strlcat(col_item->col_buf, orig, max_len);
|
||||
(void) g_strlcat(col_item->col_buf, orig, max_len);
|
||||
col_item->col_data = col_item->col_buf;
|
||||
}
|
||||
}
|
||||
|
@ -664,7 +664,7 @@ col_add_str(column_info *cinfo, const gint el, const gchar* str)
|
|||
*/
|
||||
col_item->col_data = col_item->col_buf;
|
||||
}
|
||||
g_strlcpy(&col_item->col_buf[col_item->col_fence], str, max_len - col_item->col_fence);
|
||||
(void) g_strlcpy(&col_item->col_buf[col_item->col_fence], str, max_len - col_item->col_fence);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -698,7 +698,7 @@ col_set_str(column_info *cinfo, const gint el, const gchar* str)
|
|||
*/
|
||||
COL_CHECK_APPEND(col_item, max_len);
|
||||
|
||||
g_strlcpy(&col_item->col_buf[col_item->col_fence], str, max_len - col_item->col_fence);
|
||||
(void) g_strlcpy(&col_item->col_buf[col_item->col_fence], str, max_len - col_item->col_fence);
|
||||
} else {
|
||||
/*
|
||||
* There's no fence, so we can just set the column to point
|
||||
|
@ -826,10 +826,10 @@ col_do_append_str(column_info *cinfo, const gint el, const gchar* separator,
|
|||
*/
|
||||
if (separator != NULL) {
|
||||
if (len != 0) {
|
||||
g_strlcat(col_item->col_buf, separator, max_len);
|
||||
(void) g_strlcat(col_item->col_buf, separator, max_len);
|
||||
}
|
||||
}
|
||||
g_strlcat(col_item->col_buf, str, max_len);
|
||||
(void) g_strlcat(col_item->col_buf, str, max_len);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -992,7 +992,7 @@ col_set_abs_ymd_time(const frame_data *fd, column_info *cinfo, const int col)
|
|||
{
|
||||
set_abs_ymd_time(fd, cinfo->columns[col].col_buf, col_decimal_point, TRUE);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
|
||||
cinfo->columns[col].col_data = cinfo->columns[col].col_buf;
|
||||
}
|
||||
|
@ -1002,7 +1002,7 @@ col_set_utc_ymd_time(const frame_data *fd, column_info *cinfo, const int col)
|
|||
{
|
||||
set_abs_ymd_time(fd, cinfo->columns[col].col_buf, col_decimal_point, FALSE);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
|
||||
cinfo->columns[col].col_data = cinfo->columns[col].col_buf;
|
||||
}
|
||||
|
@ -1120,7 +1120,7 @@ col_set_abs_ydoy_time(const frame_data *fd, column_info *cinfo, const int col)
|
|||
{
|
||||
set_abs_ydoy_time(fd, cinfo->columns[col].col_buf, col_decimal_point, TRUE);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
|
||||
cinfo->columns[col].col_data = cinfo->columns[col].col_buf;
|
||||
}
|
||||
|
@ -1130,7 +1130,7 @@ col_set_utc_ydoy_time(const frame_data *fd, column_info *cinfo, const int col)
|
|||
{
|
||||
set_abs_ydoy_time(fd, cinfo->columns[col].col_buf, col_decimal_point, FALSE);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
|
||||
cinfo->columns[col].col_data = cinfo->columns[col].col_buf;
|
||||
}
|
||||
|
@ -1397,7 +1397,7 @@ col_set_rel_time(const frame_data *fd, column_info *cinfo, const int col)
|
|||
case TS_SECONDS_DEFAULT:
|
||||
set_time_seconds(fd, &del_rel_ts, cinfo->columns[col].col_buf);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time_relative";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
break;
|
||||
case TS_SECONDS_HOUR_MIN_SEC:
|
||||
set_time_hour_min_sec(fd, &del_rel_ts, cinfo->columns[col].col_buf, col_decimal_point);
|
||||
|
@ -1421,7 +1421,7 @@ col_set_delta_time(const frame_data *fd, column_info *cinfo, const int col)
|
|||
case TS_SECONDS_DEFAULT:
|
||||
set_time_seconds(fd, &del_cap_ts, cinfo->columns[col].col_buf);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time_delta";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
break;
|
||||
case TS_SECONDS_HOUR_MIN_SEC:
|
||||
set_time_hour_min_sec(fd, &del_cap_ts, cinfo->columns[col].col_buf, col_decimal_point);
|
||||
|
@ -1451,7 +1451,7 @@ col_set_delta_time_dis(const frame_data *fd, column_info *cinfo, const int col)
|
|||
case TS_SECONDS_DEFAULT:
|
||||
set_time_seconds(fd, &del_dis_ts, cinfo->columns[col].col_buf);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time_delta_displayed";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
break;
|
||||
case TS_SECONDS_HOUR_MIN_SEC:
|
||||
set_time_hour_min_sec(fd, &del_dis_ts, cinfo->columns[col].col_buf, col_decimal_point);
|
||||
|
@ -1567,7 +1567,7 @@ col_set_abs_time(const frame_data *fd, column_info *cinfo, const int col)
|
|||
{
|
||||
set_abs_time(fd, cinfo->columns[col].col_buf, col_decimal_point, TRUE);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
|
||||
cinfo->columns[col].col_data = cinfo->columns[col].col_buf;
|
||||
}
|
||||
|
@ -1577,7 +1577,7 @@ col_set_utc_time(const frame_data *fd, column_info *cinfo, const int col)
|
|||
{
|
||||
set_abs_time(fd, cinfo->columns[col].col_buf, col_decimal_point, FALSE);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
|
||||
cinfo->columns[col].col_data = cinfo->columns[col].col_buf;
|
||||
}
|
||||
|
@ -1652,7 +1652,7 @@ col_set_epoch_time(const frame_data *fd, column_info *cinfo, const int col)
|
|||
{
|
||||
if (set_epoch_time(fd, cinfo->columns[col].col_buf)) {
|
||||
cinfo->col_expr.col_expr[col] = "frame.time_delta";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->columns[col].col_buf,COL_MAX_LEN);
|
||||
}
|
||||
cinfo->columns[col].col_data = cinfo->columns[col].col_buf;
|
||||
}
|
||||
|
@ -1922,7 +1922,7 @@ col_set_time(column_info *cinfo, const gint el, const nstime_t *ts, const char *
|
|||
}
|
||||
col_item->col_data = col_item->col_buf;
|
||||
cinfo->col_expr.col_expr[col] = fieldname;
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],col_item->col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col],col_item->col_buf,COL_MAX_LEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1972,7 +1972,7 @@ col_set_port(packet_info *pinfo, const int col, const gboolean is_res, const gbo
|
|||
switch (pinfo->ptype) {
|
||||
case PT_SCTP:
|
||||
if (is_res)
|
||||
g_strlcpy(col_item->col_buf, sctp_port_to_display(pinfo->pool, port), COL_MAX_LEN);
|
||||
(void) g_strlcpy(col_item->col_buf, sctp_port_to_display(pinfo->pool, port), COL_MAX_LEN);
|
||||
else
|
||||
guint32_to_str_buf(port, col_item->col_buf, COL_MAX_LEN);
|
||||
break;
|
||||
|
@ -1980,9 +1980,9 @@ col_set_port(packet_info *pinfo, const int col, const gboolean is_res, const gbo
|
|||
case PT_TCP:
|
||||
guint32_to_str_buf(port, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
if (is_res)
|
||||
g_strlcpy(col_item->col_buf, tcp_port_to_display(pinfo->pool, port), COL_MAX_LEN);
|
||||
(void) g_strlcpy(col_item->col_buf, tcp_port_to_display(pinfo->pool, port), COL_MAX_LEN);
|
||||
else
|
||||
g_strlcpy(col_item->col_buf, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
(void) g_strlcpy(col_item->col_buf, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
if (is_src)
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "tcp.srcport";
|
||||
else
|
||||
|
@ -1992,9 +1992,9 @@ col_set_port(packet_info *pinfo, const int col, const gboolean is_res, const gbo
|
|||
case PT_UDP:
|
||||
guint32_to_str_buf(port, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
if (is_res)
|
||||
g_strlcpy(col_item->col_buf, udp_port_to_display(pinfo->pool, port), COL_MAX_LEN);
|
||||
(void) g_strlcpy(col_item->col_buf, udp_port_to_display(pinfo->pool, port), COL_MAX_LEN);
|
||||
else
|
||||
g_strlcpy(col_item->col_buf, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
(void) g_strlcpy(col_item->col_buf, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
if (is_src)
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "udp.srcport";
|
||||
else
|
||||
|
@ -2007,13 +2007,13 @@ col_set_port(packet_info *pinfo, const int col, const gboolean is_res, const gbo
|
|||
else
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "ddp.dst_socket";
|
||||
guint32_to_str_buf(port, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
g_strlcpy(col_item->col_buf, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
(void) g_strlcpy(col_item->col_buf, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
break;
|
||||
|
||||
case PT_IPX:
|
||||
/* XXX - resolve IPX socket numbers */
|
||||
snprintf(col_item->col_buf, COL_MAX_LEN, "0x%04x", port);
|
||||
g_strlcpy(pinfo->cinfo->col_expr.col_expr_val[col], col_item->col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(pinfo->cinfo->col_expr.col_expr_val[col], col_item->col_buf,COL_MAX_LEN);
|
||||
if (is_src)
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "ipx.src.socket";
|
||||
else
|
||||
|
@ -2023,7 +2023,7 @@ col_set_port(packet_info *pinfo, const int col, const gboolean is_res, const gbo
|
|||
case PT_IDP:
|
||||
/* XXX - resolve IDP socket numbers */
|
||||
snprintf(col_item->col_buf, COL_MAX_LEN, "0x%04x", port);
|
||||
g_strlcpy(pinfo->cinfo->col_expr.col_expr_val[col], col_item->col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(pinfo->cinfo->col_expr.col_expr_val[col], col_item->col_buf,COL_MAX_LEN);
|
||||
if (is_src)
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "idp.src.socket";
|
||||
else
|
||||
|
@ -2033,7 +2033,7 @@ col_set_port(packet_info *pinfo, const int col, const gboolean is_res, const gbo
|
|||
case PT_USB:
|
||||
/* XXX - resolve USB endpoint numbers */
|
||||
snprintf(col_item->col_buf, COL_MAX_LEN, "0x%08x", port);
|
||||
g_strlcpy(pinfo->cinfo->col_expr.col_expr_val[col], col_item->col_buf,COL_MAX_LEN);
|
||||
(void) g_strlcpy(pinfo->cinfo->col_expr.col_expr_val[col], col_item->col_buf,COL_MAX_LEN);
|
||||
if (is_src)
|
||||
pinfo->cinfo->col_expr.col_expr[col] = "usb.src.endpoint";
|
||||
else
|
||||
|
@ -2118,7 +2118,7 @@ col_fill_in_frame_data(const frame_data *fd, column_info *cinfo, const gint col,
|
|||
switch (col_item->col_fmt) {
|
||||
case COL_NUMBER:
|
||||
cinfo->col_expr.col_expr[col] = "frame.number";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col], col_item->col_buf, COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col], col_item->col_buf, COL_MAX_LEN);
|
||||
break;
|
||||
|
||||
case COL_CLS_TIME:
|
||||
|
@ -2136,7 +2136,7 @@ col_fill_in_frame_data(const frame_data *fd, column_info *cinfo, const gint col,
|
|||
|
||||
case COL_PACKET_LENGTH:
|
||||
cinfo->col_expr.col_expr[col] = "frame.len";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col], col_item->col_buf, COL_MAX_LEN);
|
||||
(void) g_strlcpy(cinfo->col_expr.col_expr_val[col], col_item->col_buf, COL_MAX_LEN);
|
||||
break;
|
||||
|
||||
case COL_CUMULATIVE_BYTES:
|
||||
|
|
|
@ -355,7 +355,7 @@ dissect_ansi_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo
|
|||
*/
|
||||
if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) {
|
||||
/* Save the application context and the sub dissector */
|
||||
g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
(void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
|
||||
p_tcap_context->subdissector_handle=subdissector_handle;
|
||||
p_tcap_context->oid_present=TRUE;
|
||||
|
|
|
@ -306,7 +306,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
|
|||
if (h225_pi != NULL) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%%s %%s", h225_pi->frame_label, codec_str);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
h225_pi->is_faststart = TRUE;
|
||||
}
|
||||
contains_faststart = TRUE;
|
||||
|
@ -444,7 +444,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
|
|||
if (contains_faststart) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
} else
|
||||
g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"));
|
||||
}
|
||||
|
@ -501,7 +501,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
|
|||
if (contains_faststart) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
} else
|
||||
g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"));
|
||||
}
|
||||
|
@ -519,7 +519,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
|
|||
if (contains_faststart) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
} else
|
||||
g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"));
|
||||
}
|
||||
|
@ -537,7 +537,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
|
|||
if (contains_faststart) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
} else
|
||||
g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"));
|
||||
}
|
||||
|
@ -568,7 +568,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
|
|||
if (contains_faststart) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
} else
|
||||
g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"));
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
|
|||
h223_lc_params_temp->subdissector = data_handle;
|
||||
|
||||
if (upcoming_channel && codec_type) {
|
||||
g_strlcpy(upcoming_channel->data_type_str, codec_type, sizeof(upcoming_channel->data_type_str));
|
||||
(void) g_strlcpy(upcoming_channel->data_type_str, codec_type, sizeof(upcoming_channel->data_type_str));
|
||||
}
|
||||
upcoming_channel = NULL;
|
||||
#.END
|
||||
|
@ -197,7 +197,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
|
|||
%(DEFAULT_BODY)s
|
||||
|
||||
if (upcoming_channel && codec_type) {
|
||||
g_strlcpy(upcoming_channel->data_type_str, codec_type, sizeof(upcoming_channel->data_type_str));
|
||||
(void) g_strlcpy(upcoming_channel->data_type_str, codec_type, sizeof(upcoming_channel->data_type_str));
|
||||
}
|
||||
upcoming_channel = NULL;
|
||||
#.END
|
||||
|
@ -386,12 +386,12 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
|
|||
/* if it is OLC or RM*/
|
||||
if ((codec_type != NULL) && (( value == RequestMessage_openLogicalChannel) || ( value == RequestMessage_requestMode)))
|
||||
{
|
||||
g_strlcat(h245_pi->frame_label, " (", 50);
|
||||
g_strlcat(h245_pi->frame_label, codec_type, 50);
|
||||
g_strlcat(h245_pi->frame_label, ")", 50);
|
||||
(void) g_strlcat(h245_pi->frame_label, " (", 50);
|
||||
(void) g_strlcat(h245_pi->frame_label, codec_type, 50);
|
||||
(void) g_strlcat(h245_pi->frame_label, ")", 50);
|
||||
}
|
||||
}
|
||||
g_strlcat(h245_pi->comment, val_to_str(value, h245_RequestMessage_vals, "<unknown>"), 50);
|
||||
(void) g_strlcat(h245_pi->comment, val_to_str(value, h245_RequestMessage_vals, "<unknown>"), 50);
|
||||
#.END
|
||||
#----------------------------------------------------------------------------------------
|
||||
#.FN_BODY ResponseMessage VAL_PTR = &value
|
||||
|
@ -406,7 +406,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
|
|||
if ( strlen(h245_pi->frame_label) == 0 ){
|
||||
g_snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_ResponseMessage_short_vals, "UKN"));
|
||||
}
|
||||
g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50);
|
||||
(void) g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50);
|
||||
}
|
||||
|
||||
#.END
|
||||
|
@ -423,7 +423,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
|
|||
if ( strlen(h245_pi->frame_label) == 0 ){
|
||||
g_snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_IndicationMessage_short_vals, "UKN"));
|
||||
}
|
||||
g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50);
|
||||
(void) g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50);
|
||||
|
||||
}
|
||||
|
||||
|
@ -441,7 +441,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
|
|||
if ( strlen(h245_pi->frame_label) == 0 ){
|
||||
g_snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_CommandMessage_short_vals, "UKN"));
|
||||
}
|
||||
g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50);
|
||||
(void) g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50);
|
||||
}
|
||||
|
||||
#.END
|
||||
|
|
|
@ -447,7 +447,7 @@ dissect_h245_FastStart_OLC(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
|
|||
h245_pi->msg_type = H245_OpenLogChn;
|
||||
|
||||
if (codec_str && codec_type){
|
||||
g_strlcpy(codec_str, codec_type, 50);
|
||||
(void) g_strlcpy(codec_str, codec_type, 50);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -47,16 +47,16 @@ InvokeProblem VAL_PTR = &problem_val
|
|||
ReturnResultProblem VAL_PTR = &problem_val
|
||||
ReturnErrorProblem VAL_PTR = &problem_val
|
||||
#.FN_FTR GeneralProblem
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_GeneralProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_GeneralProblem_vals), ""), 64);
|
||||
problem_str[64-1] = '\0';
|
||||
#.FN_FTR InvokeProblem
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_InvokeProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_InvokeProblem_vals), ""), 64);
|
||||
problem_str[64-1] = '\0';
|
||||
#.FN_FTR ReturnResultProblem
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_ReturnResultProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_ReturnResultProblem_vals), ""), 64);
|
||||
problem_str[64-1] = '\0';
|
||||
#.FN_FTR ReturnErrorProblem
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_ReturnErrorProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_ReturnErrorProblem_vals), ""), 64);
|
||||
problem_str[64-1] = '\0';
|
||||
#.END
|
||||
|
||||
|
|
|
@ -1302,7 +1302,7 @@ int dissect_mscldap_string(tvbuff_t *tvb, int offset, char *str, int max_len, gb
|
|||
|
||||
/* The name data MUST start at offset 0 of the tvb */
|
||||
compr_len = get_dns_name(tvb, offset, max_len, 0, &name, &name_len);
|
||||
g_strlcpy(str, name, max_len);
|
||||
(void) g_strlcpy(str, name, max_len);
|
||||
return offset + compr_len;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,8 +98,8 @@ static void
|
|||
private_data_add_moreCinfo_id(asn1_ctx_t *actx, tvbuff_t *tvb)
|
||||
{
|
||||
mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx);
|
||||
g_strlcat(private_data->moreCinfo, " ", BUFFER_SIZE_MORE);
|
||||
g_strlcat(private_data->moreCinfo, tvb_get_string_enc(wmem_packet_scope(),
|
||||
(void) g_strlcat(private_data->moreCinfo, " ", BUFFER_SIZE_MORE);
|
||||
(void) g_strlcat(private_data->moreCinfo, tvb_get_string_enc(wmem_packet_scope(),
|
||||
tvb, 2, tvb_get_guint8(tvb, 1), ENC_STRING), BUFFER_SIZE_MORE);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,13 +50,13 @@ InvokeProblem VAL_PTR = &problem_val
|
|||
ReturnResultProblem VAL_PTR = &problem_val
|
||||
ReturnErrorProblem VAL_PTR = &problem_val
|
||||
#.FN_FTR GeneralProblem
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_GeneralProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_GeneralProblem_vals), ""), 64);
|
||||
#.FN_FTR InvokeProblem
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_InvokeProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_InvokeProblem_vals), ""), 64);
|
||||
#.FN_FTR ReturnResultProblem
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_ReturnResultProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_ReturnResultProblem_vals), ""), 64);
|
||||
#.FN_FTR ReturnErrorProblem
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_ReturnErrorProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_ReturnErrorProblem_vals), ""), 64);
|
||||
#.END
|
||||
|
||||
#--- INVOKE ---
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!err_next_tvb) { /* empty error */
|
||||
err_next_tvb = tvb_new_subset_length_caplen(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!arg_next_tvb) { /* empty argument */
|
||||
arg_next_tvb = tvb_new_subset_length_caplen(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
#.END
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (actx->rose_ctx->d.code != -1) {
|
||||
if (!res_next_tvb) { /* empty result */
|
||||
|
|
|
@ -781,7 +781,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
|
|||
|
||||
pi = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
|
||||
expert_add_info_format(actx->pinfo, pi, &ei_snmp_varbind_response, "%s",note);
|
||||
g_strlcpy (label, note, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcpy (label, note, ITEM_LABEL_LENGTH);
|
||||
goto set_label;
|
||||
}
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ void t38_add_address(packet_info *pinfo,
|
|||
/*
|
||||
* Update the conversation data.
|
||||
*/
|
||||
g_strlcpy(p_conversation_data->setup_method, setup_method, MAX_T38_SETUP_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_conversation_data->setup_method, setup_method, MAX_T38_SETUP_METHOD_SIZE);
|
||||
p_conversation_data->setup_frame_number = setup_frame_number;
|
||||
p_conversation_data->src_t38_info.reass_ID = 0;
|
||||
p_conversation_data->src_t38_info.reass_start_seqnum = -1;
|
||||
|
@ -454,7 +454,7 @@ init_t38_info_conv(packet_info *pinfo)
|
|||
if (!p_t38_packet_conv) {
|
||||
/* copy the t38 conversation info to the packet t38 conversation */
|
||||
p_t38_packet_conv = wmem_new(wmem_file_scope(), t38_conv);
|
||||
g_strlcpy(p_t38_packet_conv->setup_method, p_t38_conv->setup_method, MAX_T38_SETUP_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_t38_packet_conv->setup_method, p_t38_conv->setup_method, MAX_T38_SETUP_METHOD_SIZE);
|
||||
p_t38_packet_conv->setup_frame_number = p_t38_conv->setup_frame_number;
|
||||
|
||||
memcpy(&(p_t38_packet_conv->src_t38_info), &(p_t38_conv->src_t38_info), sizeof(t38_conv_info));
|
||||
|
|
|
@ -1892,7 +1892,7 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
*/
|
||||
if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) {
|
||||
/* Save the application context and the sub dissector */
|
||||
g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
(void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
p_tcap_context->oid_present=TRUE;
|
||||
if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
|
||||
p_tcap_context->subdissector_handle=subdissector_handle;
|
||||
|
@ -2231,7 +2231,7 @@ dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs
|
|||
/* ACN, changed, Fallback to lower version
|
||||
* and update the subdissector (purely formal)
|
||||
*/
|
||||
g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
(void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
if ((subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid))) {
|
||||
p_tcap_context->subdissector_handle = subdissector_handle;
|
||||
p_tcap_context->subdissector_present = TRUE;
|
||||
|
@ -2239,7 +2239,7 @@ dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs
|
|||
}
|
||||
} else {
|
||||
/* We do not have the OID in the TCAP context, so store it */
|
||||
g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
(void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
p_tcap_context->oid_present = TRUE;
|
||||
/* Try to find a subdissector according to OID */
|
||||
if ((subdissector_handle
|
||||
|
|
|
@ -198,8 +198,8 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember"
|
|||
if(!name) name = actx->external.direct_reference;
|
||||
|
||||
if(last_rdn) { /* append it to the RDN */
|
||||
g_strlcat(last_rdn, name, MAX_RDN_STR_LEN);
|
||||
g_strlcat(last_rdn, "=", MAX_RDN_STR_LEN);
|
||||
(void) g_strlcat(last_rdn, name, MAX_RDN_STR_LEN);
|
||||
(void) g_strlcat(last_rdn, "=", MAX_RDN_STR_LEN);
|
||||
|
||||
/* append it to the tree */
|
||||
proto_item_append_text(tree, " (%%s=", name);
|
||||
|
@ -245,7 +245,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember"
|
|||
value = tvb_format_text(out_tvb, 0, tvb_reported_length(out_tvb));
|
||||
|
||||
if(last_rdn) {
|
||||
g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
|
||||
(void) g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
|
||||
|
||||
/* append it to the tree*/
|
||||
proto_item_append_text(tree, "%%s)", value);
|
||||
|
@ -345,9 +345,9 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember"
|
|||
if(*last_dn) {
|
||||
temp_dn = (char *)wmem_strdup_printf(wmem_packet_scope(), "%%s,%%s", last_rdn, last_dn);
|
||||
last_dn[0] = '\0';
|
||||
g_strlcat(last_dn, temp_dn, MAX_DN_STR_LEN);
|
||||
(void) g_strlcat(last_dn, temp_dn, MAX_DN_STR_LEN);
|
||||
} else {
|
||||
g_strlcat(last_dn, last_rdn, MAX_DN_STR_LEN);
|
||||
(void) g_strlcat(last_dn, last_rdn, MAX_DN_STR_LEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,7 +361,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember"
|
|||
|
||||
if(last_rdn)
|
||||
/* this is an additional value - delimit */
|
||||
g_strlcat(last_rdn, "+", MAX_RDN_STR_LEN);
|
||||
(void) g_strlcat(last_rdn, "+", MAX_RDN_STR_LEN);
|
||||
}
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
|
|
|
@ -3685,7 +3685,7 @@ prefs_6lowpan_apply(void)
|
|||
|
||||
for (i = 0; i < LOWPAN_CONTEXT_MAX; i++) {
|
||||
if (!lowpan_context_prefs[i]) continue;
|
||||
g_strlcpy(prefix_buf, lowpan_context_prefs[i], 48);
|
||||
(void) g_strlcpy(prefix_buf, lowpan_context_prefs[i], 48);
|
||||
if ((prefix_str = strtok(prefix_buf, "/")) == NULL) continue;
|
||||
if ((prefix_len_str = strtok(NULL, "/")) == NULL) continue;
|
||||
if (sscanf(prefix_len_str, "%u", &prefix_len) != 1) continue;
|
||||
|
|
|
@ -1108,7 +1108,7 @@ static void conv_set_fid(packet_info *pinfo, guint32 fid, const gchar *path, gsi
|
|||
return;
|
||||
|
||||
str = (char*)wmem_alloc(wmem_file_scope(), len);
|
||||
g_strlcpy(str, path, len);
|
||||
(void) g_strlcpy(str, path, len);
|
||||
conv_set_fid_nocopy(pinfo, fid, str);
|
||||
}
|
||||
|
||||
|
@ -1148,7 +1148,7 @@ static void conv_set_tag(packet_info *pinfo, guint16 tag, enum _9p_msg_t msgtype
|
|||
taginfo->fid = fid;
|
||||
if (fid_path) {
|
||||
taginfo->fid_path = (char*)wmem_alloc(wmem_file_scope(), wmem_strbuf_get_len(fid_path)+1);
|
||||
g_strlcpy(taginfo->fid_path, wmem_strbuf_get_str(fid_path), wmem_strbuf_get_len(fid_path)+1);
|
||||
(void) g_strlcpy(taginfo->fid_path, wmem_strbuf_get_str(fid_path), wmem_strbuf_get_len(fid_path)+1);
|
||||
} else {
|
||||
taginfo->fid_path = NULL;
|
||||
}
|
||||
|
|
|
@ -722,13 +722,13 @@ static void OUT_FS_AFSVolSync(ptvcursor_t *cursor)
|
|||
int acllen; \
|
||||
char tmp[10]; \
|
||||
tmp[0] = 0; \
|
||||
if ( acl & PRSFS_READ ) g_strlcat(tmp, "r", 10); \
|
||||
if ( acl & PRSFS_LOOKUP ) g_strlcat(tmp, "l", 10); \
|
||||
if ( acl & PRSFS_INSERT ) g_strlcat(tmp, "i", 10); \
|
||||
if ( acl & PRSFS_DELETE ) g_strlcat(tmp, "d", 10); \
|
||||
if ( acl & PRSFS_WRITE ) g_strlcat(tmp, "w", 10); \
|
||||
if ( acl & PRSFS_LOCK ) g_strlcat(tmp, "k", 10); \
|
||||
if ( acl & PRSFS_ADMINISTER ) g_strlcat(tmp, "a", 10); \
|
||||
if ( acl & PRSFS_READ ) (void) g_strlcat(tmp, "r", 10); \
|
||||
if ( acl & PRSFS_LOOKUP ) (void) g_strlcat(tmp, "l", 10); \
|
||||
if ( acl & PRSFS_INSERT ) (void) g_strlcat(tmp, "i", 10); \
|
||||
if ( acl & PRSFS_DELETE ) (void) g_strlcat(tmp, "d", 10); \
|
||||
if ( acl & PRSFS_WRITE ) (void) g_strlcat(tmp, "w", 10); \
|
||||
if ( acl & PRSFS_LOCK ) (void) g_strlcat(tmp, "k", 10); \
|
||||
if ( acl & PRSFS_ADMINISTER ) (void) g_strlcat(tmp, "a", 10); \
|
||||
save = tree; \
|
||||
tree = proto_tree_add_subtree_format(tree, tvb, offset, bytes, \
|
||||
ett_afs_acl, NULL, "ACL: %s %s%s", \
|
||||
|
|
|
@ -1416,7 +1416,7 @@ dissect_ansi_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo
|
|||
*/
|
||||
if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) {
|
||||
/* Save the application context and the sub dissector */
|
||||
g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
(void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
|
||||
p_tcap_context->subdissector_handle=subdissector_handle;
|
||||
p_tcap_context->oid_present=TRUE;
|
||||
|
|
|
@ -1874,7 +1874,7 @@ dissect_at_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
char *name;
|
||||
|
||||
name = (char *) wmem_alloc(wmem_packet_scope(), i_char + 2);
|
||||
g_strlcpy(name, at_command, i_char + 1);
|
||||
(void) g_strlcpy(name, at_command, i_char + 1);
|
||||
name[i_char + 1] = '\0';
|
||||
proto_item_append_text(command_item, ": %s (Unknown)", name);
|
||||
proto_item_append_text(pitem, " (Unknown)");
|
||||
|
|
|
@ -1920,7 +1920,7 @@ dissect_at_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
char *name;
|
||||
|
||||
name = (char *) wmem_alloc(wmem_packet_scope(), i_char + 2);
|
||||
g_strlcpy(name, at_command, i_char + 1);
|
||||
(void) g_strlcpy(name, at_command, i_char + 1);
|
||||
name[i_char + 1] = '\0';
|
||||
proto_item_append_text(command_item, ": %s (Unknown)", name);
|
||||
proto_item_append_text(pitem, " (Unknown - Non-Standard HFP Command)");
|
||||
|
|
|
@ -395,7 +395,7 @@ dissect_at_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
char *name;
|
||||
|
||||
name = (char *) wmem_alloc(wmem_packet_scope(), i_char + 2);
|
||||
g_strlcpy(name, at_command, i_char + 1);
|
||||
(void) g_strlcpy(name, at_command, i_char + 1);
|
||||
name[i_char + 1] = '\0';
|
||||
proto_item_append_text(command_item, ": %s (Unknown)", name);
|
||||
proto_item_append_text(pitem, " (Unknown - Non-Standard HSP Command)");
|
||||
|
|
|
@ -3102,8 +3102,8 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
|
|||
/* TODO: only look inside if a preference enabled? */
|
||||
char dotted_protocol_name[128];
|
||||
/* N.B. avoiding g_snprintf(), which was slow */
|
||||
g_strlcpy(dotted_protocol_name, "dct2000.", 128);
|
||||
g_strlcpy(dotted_protocol_name+8, protocol_name, 128-8);
|
||||
(void) g_strlcpy(dotted_protocol_name, "dct2000.", 128);
|
||||
(void) g_strlcpy(dotted_protocol_name+8, protocol_name, 128-8);
|
||||
protocol_handle = find_dissector(dotted_protocol_name);
|
||||
}
|
||||
|
||||
|
|
|
@ -5549,7 +5549,7 @@ int dissect_cip_attribute(packet_info *pinfo, proto_tree *tree, proto_item *item
|
|||
if (date != NULL)
|
||||
strftime(date_str, 20, "%b %d, %Y", date);
|
||||
else
|
||||
g_strlcpy(date_str, "Not representable", sizeof date_str);
|
||||
(void) g_strlcpy(date_str, "Not representable", sizeof date_str);
|
||||
proto_tree_add_uint_format_value(tree, *(attr->phf), tvb, offset, 2, temp_data, "%s", date_str);
|
||||
consumed = 2;
|
||||
break;
|
||||
|
|
|
@ -274,11 +274,11 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
|
|||
"Unknown (0x%02x)");
|
||||
flag_string[0] = '\0';
|
||||
if (cnf_type & CNF_SEG_OK)
|
||||
g_strlcat(flag_string, "S ", 7);
|
||||
(void) g_strlcat(flag_string, "S ", 7);
|
||||
if (cnf_type & CNF_MORE_SEGS)
|
||||
g_strlcat(flag_string, "M ", 7);
|
||||
(void) g_strlcat(flag_string, "M ", 7);
|
||||
if (cnf_type & CNF_ERR_OK)
|
||||
g_strlcat(flag_string, "E ", 7);
|
||||
(void) g_strlcat(flag_string, "E ", 7);
|
||||
ti = proto_tree_add_uint_format(clnp_tree, hf_clnp_type, tvb, P_CLNP_TYPE, 1,
|
||||
cnf_type,
|
||||
"PDU Type : 0x%02x (%s%s)",
|
||||
|
|
|
@ -279,7 +279,7 @@ dissect_corosynec_totemnet_with_decryption(tvbuff_t *tvb,
|
|||
memset(private_key, 0, sizeof(private_key));
|
||||
|
||||
private_key_len = (strlen(key_for_trial)+4) & 0xFC;
|
||||
g_strlcpy(private_key, key_for_trial, private_key_len);
|
||||
(void) g_strlcpy(private_key, key_for_trial, private_key_len);
|
||||
|
||||
/*
|
||||
* Generate MAC, CIPHER, IV keys from private key
|
||||
|
|
|
@ -166,7 +166,7 @@ dissect_cpfi_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tda = (word1 & CPFI_DEST_MASK) >> CPFI_DEST_SHIFT;
|
||||
if ( tda >= FIRST_TIO_CARD_ADDRESS )
|
||||
{
|
||||
g_strlcpy(src_str, " CPFI", sizeof(src_str));
|
||||
(void) g_strlcpy(src_str, " CPFI", sizeof(src_str));
|
||||
src = 0; /* Make it smallest */
|
||||
}
|
||||
else
|
||||
|
@ -188,7 +188,7 @@ dissect_cpfi_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tda = (word1 & CPFI_SOURCE_MASK) >> CPFI_SOURCE_SHIFT;
|
||||
if ( tda >= FIRST_TIO_CARD_ADDRESS )
|
||||
{
|
||||
g_strlcpy(dst_str, " CPFI", sizeof(dst_str));
|
||||
(void) g_strlcpy(dst_str, " CPFI", sizeof(dst_str));
|
||||
dst = 0; /* Make it smallest */
|
||||
}
|
||||
else
|
||||
|
|
|
@ -882,7 +882,7 @@ dcerpc_prompt(packet_info *pinfo, gchar* result)
|
|||
dcerpc_get_transport_salt(pinfo));
|
||||
g_string_append(str, "with:\r\n");
|
||||
|
||||
g_strlcpy(result, str->str, MAX_DECODE_AS_PROMPT_LEN);
|
||||
(void) g_strlcpy(result, str->str, MAX_DECODE_AS_PROMPT_LEN);
|
||||
g_string_free(str, TRUE);
|
||||
g_string_free(address_str, TRUE);
|
||||
}
|
||||
|
|
|
@ -8179,20 +8179,20 @@ static int dissect_oap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
|
|||
guint8 no_of_bits = 5;
|
||||
guint8 i;
|
||||
guint8 bit = 3;
|
||||
g_strlcpy(str, "...", 20);
|
||||
(void) g_strlcpy(str, "...", 20);
|
||||
|
||||
/* read the bits for the int */
|
||||
for (i = 0; i < no_of_bits; i++)
|
||||
{
|
||||
if (bit && (!(bit % 4)))
|
||||
g_strlcat(str, " ", 20);
|
||||
(void) g_strlcat(str, " ", 20);
|
||||
|
||||
bit++;
|
||||
|
||||
if (opcode & mask)
|
||||
g_strlcat(str, "1", 20);
|
||||
(void) g_strlcat(str, "1", 20);
|
||||
else
|
||||
g_strlcat(str, "0", 20);
|
||||
(void) g_strlcat(str, "0", 20);
|
||||
|
||||
mask = mask >> 1;
|
||||
}
|
||||
|
|
|
@ -1056,7 +1056,7 @@ static void decode_payload_twopc_reply(tvbuff_t *tvb, proto_tree *tree)
|
|||
static void format_node_mask(gchar *s, guint64 value)
|
||||
{
|
||||
if (!value) {
|
||||
g_strlcpy(s, "<none>", ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcpy(s, "<none>", ITEM_LABEL_LENGTH);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ epl_eds_load(struct profile *profile, const char *eds_file)
|
|||
if ((name = g_key_file_get_string(gkf, *group, "ParameterName", NULL)))
|
||||
{
|
||||
gsize count = strcspn(name, "#") + 1;
|
||||
g_strlcpy(
|
||||
(void) g_strlcpy(
|
||||
tmpobj.name,
|
||||
name,
|
||||
count > sizeof tmpobj.name ? sizeof tmpobj.name : count
|
||||
|
@ -471,7 +471,7 @@ parse_obj_tag(xmlNode *cur, struct od_entry *out, struct profile *profile) {
|
|||
return FALSE;
|
||||
|
||||
} else if (g_str_equal("name", key)) {
|
||||
g_strlcpy(out->name, val, sizeof out->name);
|
||||
(void) g_strlcpy(out->name, val, sizeof out->name);
|
||||
|
||||
} else if (g_str_equal("objectType", key)) {
|
||||
out->type_class = 0;
|
||||
|
|
|
@ -380,25 +380,25 @@ dissect_fmp_flushCmd(tvbuff_t *tvb, int offset, proto_tree *tree)
|
|||
if (cmd & bitValue) {
|
||||
switch (bitValue) {
|
||||
case FMP_COMMIT_SPECIFIED:
|
||||
g_strlcat(msg, "COMMIT_SPECIFIED", MAX_MSG_SIZE);
|
||||
(void) g_strlcat(msg, "COMMIT_SPECIFIED", MAX_MSG_SIZE);
|
||||
break;
|
||||
case FMP_RELEASE_SPECIFIED:
|
||||
g_strlcat(msg, "RELEASE_SPECIFIED", MAX_MSG_SIZE);
|
||||
(void) g_strlcat(msg, "RELEASE_SPECIFIED", MAX_MSG_SIZE);
|
||||
break;
|
||||
case FMP_RELEASE_ALL:
|
||||
g_strlcat(msg, "RELEASE_ALL", MAX_MSG_SIZE);
|
||||
(void) g_strlcat(msg, "RELEASE_ALL", MAX_MSG_SIZE);
|
||||
break;
|
||||
case FMP_CLOSE_FILE:
|
||||
g_strlcat(msg, "CLOSE_FILE", MAX_MSG_SIZE);
|
||||
(void) g_strlcat(msg, "CLOSE_FILE", MAX_MSG_SIZE);
|
||||
break;
|
||||
case FMP_UPDATE_TIME:
|
||||
g_strlcat(msg, "UPDATE_TIME", MAX_MSG_SIZE);
|
||||
(void) g_strlcat(msg, "UPDATE_TIME", MAX_MSG_SIZE);
|
||||
break;
|
||||
case FMP_ACCESS_TIME:
|
||||
g_strlcat(msg, "ACCESS_TIME", MAX_MSG_SIZE);
|
||||
(void) g_strlcat(msg, "ACCESS_TIME", MAX_MSG_SIZE);
|
||||
break;
|
||||
default:
|
||||
g_strlcat(msg, "UNKNOWN", MAX_MSG_SIZE);
|
||||
(void) g_strlcat(msg, "UNKNOWN", MAX_MSG_SIZE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -407,13 +407,13 @@ dissect_fmp_flushCmd(tvbuff_t *tvb, int offset, proto_tree *tree)
|
|||
|
||||
/* add a "bitwise inclusive OR" symbol between cmds */
|
||||
if (cmd) {
|
||||
g_strlcat(msg, " | ", MAX_MSG_SIZE);
|
||||
(void) g_strlcat(msg, " | ", MAX_MSG_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen(msg) == 0) {
|
||||
g_strlcpy(msg, "No command specified", MAX_MSG_SIZE);
|
||||
(void) g_strlcpy(msg, "No command specified", MAX_MSG_SIZE);
|
||||
}
|
||||
|
||||
proto_tree_add_uint_format_value(tree, hf_fmp_cmd, tvb, offset, 4, cmd, "%s", msg);
|
||||
|
|
|
@ -605,7 +605,7 @@ geonw_addr_resolve(hashgeonw_t *tp) {
|
|||
set_address(ð_addr, AT_ETHER, 6, &(addr[2]));
|
||||
ether_to_str(ð_addr, rname, 18);
|
||||
// We could use ether_name_resolution_str:
|
||||
// g_strlcpy(rname, ether_name_resolution_str(ð_addr), MAXNAMELEN-l1-4);
|
||||
// (void) g_strlcpy(rname, ether_name_resolution_str(ð_addr), MAXNAMELEN-l1-4);
|
||||
|
||||
tp->status = 1;
|
||||
|
||||
|
|
|
@ -3252,7 +3252,7 @@ dissect_h225_FastStart_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
if (h225_pi != NULL) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s %s", h225_pi->frame_label, codec_str);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
h225_pi->is_faststart = TRUE;
|
||||
}
|
||||
contains_faststart = TRUE;
|
||||
|
@ -4290,7 +4290,7 @@ dissect_h225_Setup_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
|
|||
if (contains_faststart) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
} else
|
||||
g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"));
|
||||
}
|
||||
|
@ -4348,7 +4348,7 @@ dissect_h225_CallProceeding_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *
|
|||
if (contains_faststart) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
} else
|
||||
g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"));
|
||||
}
|
||||
|
@ -4397,7 +4397,7 @@ dissect_h225_Connect_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
|
|||
if (contains_faststart) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
} else
|
||||
g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"));
|
||||
}
|
||||
|
@ -4444,7 +4444,7 @@ dissect_h225_Alerting_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
|
|||
if (contains_faststart) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
} else
|
||||
g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"));
|
||||
}
|
||||
|
@ -4804,7 +4804,7 @@ dissect_h225_Progress_UUIE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
|
|||
if (contains_faststart) {
|
||||
char temp[50];
|
||||
g_snprintf(temp, 50, "%s OLC (%s)", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"), h225_pi->frame_label);
|
||||
g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
(void) g_strlcpy(h225_pi->frame_label, temp, 50);
|
||||
} else
|
||||
g_snprintf(h225_pi->frame_label, 50, "%s", val_to_str(h225_pi->cs_type, T_h323_message_body_vals, "<unknown>"));
|
||||
}
|
||||
|
|
|
@ -8458,7 +8458,7 @@ dissect_h245_T_forwardLogicalChannelParameters(tvbuff_t *tvb _U_, int offset _U_
|
|||
h223_lc_params_temp->subdissector = data_handle;
|
||||
|
||||
if (upcoming_channel && codec_type) {
|
||||
g_strlcpy(upcoming_channel->data_type_str, codec_type, sizeof(upcoming_channel->data_type_str));
|
||||
(void) g_strlcpy(upcoming_channel->data_type_str, codec_type, sizeof(upcoming_channel->data_type_str));
|
||||
}
|
||||
upcoming_channel = NULL;
|
||||
|
||||
|
@ -8527,7 +8527,7 @@ dissect_h245_OLC_reverseLogicalChannelParameters(tvbuff_t *tvb _U_, int offset _
|
|||
|
||||
|
||||
if (upcoming_channel && codec_type) {
|
||||
g_strlcpy(upcoming_channel->data_type_str, codec_type, sizeof(upcoming_channel->data_type_str));
|
||||
(void) g_strlcpy(upcoming_channel->data_type_str, codec_type, sizeof(upcoming_channel->data_type_str));
|
||||
}
|
||||
upcoming_channel = NULL;
|
||||
|
||||
|
@ -10735,12 +10735,12 @@ dissect_h245_RequestMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
/* if it is OLC or RM*/
|
||||
if ((codec_type != NULL) && (( value == RequestMessage_openLogicalChannel) || ( value == RequestMessage_requestMode)))
|
||||
{
|
||||
g_strlcat(h245_pi->frame_label, " (", 50);
|
||||
g_strlcat(h245_pi->frame_label, codec_type, 50);
|
||||
g_strlcat(h245_pi->frame_label, ")", 50);
|
||||
(void) g_strlcat(h245_pi->frame_label, " (", 50);
|
||||
(void) g_strlcat(h245_pi->frame_label, codec_type, 50);
|
||||
(void) g_strlcat(h245_pi->frame_label, ")", 50);
|
||||
}
|
||||
}
|
||||
g_strlcat(h245_pi->comment, val_to_str(value, h245_RequestMessage_vals, "<unknown>"), 50);
|
||||
(void) g_strlcat(h245_pi->comment, val_to_str(value, h245_RequestMessage_vals, "<unknown>"), 50);
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -12356,7 +12356,7 @@ dissect_h245_ResponseMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
if ( strlen(h245_pi->frame_label) == 0 ){
|
||||
g_snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_ResponseMessage_short_vals, "UKN"));
|
||||
}
|
||||
g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50);
|
||||
(void) g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50);
|
||||
}
|
||||
|
||||
|
||||
|
@ -13388,7 +13388,7 @@ dissect_h245_CommandMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
if ( strlen(h245_pi->frame_label) == 0 ){
|
||||
g_snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_CommandMessage_short_vals, "UKN"));
|
||||
}
|
||||
g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50);
|
||||
(void) g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50);
|
||||
}
|
||||
|
||||
|
||||
|
@ -14449,7 +14449,7 @@ dissect_h245_IndicationMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac
|
|||
if ( strlen(h245_pi->frame_label) == 0 ){
|
||||
g_snprintf(h245_pi->frame_label, 50, "%s", val_to_str(value, h245_IndicationMessage_short_vals, "UKN"));
|
||||
}
|
||||
g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50);
|
||||
(void) g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50);
|
||||
|
||||
}
|
||||
|
||||
|
@ -14559,7 +14559,7 @@ dissect_h245_FastStart_OLC(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
|
|||
h245_pi->msg_type = H245_OpenLogChn;
|
||||
|
||||
if (codec_str && codec_type){
|
||||
g_strlcpy(codec_str, codec_type, 50);
|
||||
(void) g_strlcpy(codec_str, codec_type, 50);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -557,25 +557,25 @@ dissect_h264_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint
|
|||
str[0] = '\0';
|
||||
for (bit=0; bit<((int)(bit_offset&0x07)); bit++) {
|
||||
if (bit && (!(bit%4))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
g_strlcat(str,".", 256);
|
||||
(void) g_strlcat(str,".", 256);
|
||||
}
|
||||
|
||||
|
||||
leading_zero_bits = -1;
|
||||
for (b = 0; !b; leading_zero_bits++) {
|
||||
if (bit && (!(bit%4))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
if (bit && (!(bit%8))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
b = tvb_get_bits8(tvb, bit_offset, 1);
|
||||
if (b != 0) {
|
||||
g_strlcat(str, "1", 256);
|
||||
(void) g_strlcat(str, "1", 256);
|
||||
} else {
|
||||
g_strlcat(str, "0", 256);
|
||||
(void) g_strlcat(str, "0", 256);
|
||||
}
|
||||
bit++;
|
||||
bit_offset++;
|
||||
|
@ -586,13 +586,13 @@ dissect_h264_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint
|
|||
*start_bit_offset = bit_offset;
|
||||
for (; bit%8; bit++) {
|
||||
if (bit && (!(bit%4))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
g_strlcat(str,".", 256);
|
||||
(void) g_strlcat(str,".", 256);
|
||||
}
|
||||
if (hf_field) {
|
||||
g_strlcat(str," = ", 256);
|
||||
g_strlcat(str, hf_field->name, 256);
|
||||
(void) g_strlcat(str," = ", 256);
|
||||
(void) g_strlcat(str, hf_field->name, 256);
|
||||
switch (descriptor) {
|
||||
case H264_SE_V:
|
||||
/* if the syntax element is coded as se(v),
|
||||
|
@ -689,25 +689,25 @@ dissect_h264_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint
|
|||
/* read the bits for the int */
|
||||
for (i=0; i<leading_zero_bits; i++) {
|
||||
if (bit && (!(bit%4))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
if (bit && (!(bit%8))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
bit++;
|
||||
tmp = value & mask;
|
||||
if (tmp != 0) {
|
||||
g_strlcat(str, "1", 256);
|
||||
(void) g_strlcat(str, "1", 256);
|
||||
} else {
|
||||
g_strlcat(str, "0", 256);
|
||||
(void) g_strlcat(str, "0", 256);
|
||||
}
|
||||
mask = mask>>1;
|
||||
}
|
||||
for ( ; bit%8; bit++) {
|
||||
if (bit && (!(bit%4))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
g_strlcat(str,".", 256);
|
||||
(void) g_strlcat(str,".", 256);
|
||||
}
|
||||
|
||||
switch (descriptor) {
|
||||
|
@ -730,11 +730,11 @@ dissect_h264_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint
|
|||
}
|
||||
|
||||
if (hf_field) {
|
||||
g_strlcat(str," = ", 256);
|
||||
g_strlcat(str, hf_field->name, 256);
|
||||
(void) g_strlcat(str," = ", 256);
|
||||
(void) g_strlcat(str, hf_field->name, 256);
|
||||
switch (descriptor) {
|
||||
case H264_SE_V:
|
||||
g_strlcat(str,"(se(v))", 256);
|
||||
(void) g_strlcat(str,"(se(v))", 256);
|
||||
/* if the syntax element is coded as se(v),
|
||||
* the value of the syntax element is derived by invoking the
|
||||
* mapping process for signed Exp-Golomb codes as specified in
|
||||
|
|
|
@ -789,26 +789,26 @@ dissect_h265_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint
|
|||
str[0] = '\0';
|
||||
for (bit = 0; bit<((int)(bit_offset & 0x07)); bit++) {
|
||||
if (bit && (!(bit % 4))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
g_strlcat(str, ".", 256);
|
||||
(void) g_strlcat(str, ".", 256);
|
||||
}
|
||||
|
||||
|
||||
leading_zero_bits = -1;
|
||||
for (b = 0; !b; leading_zero_bits++) {
|
||||
if (bit && (!(bit % 4))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
if (bit && (!(bit % 8))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
b = tvb_get_bits8(tvb, bit_offset, 1);
|
||||
if (b != 0) {
|
||||
g_strlcat(str, "1", 256);
|
||||
(void) g_strlcat(str, "1", 256);
|
||||
}
|
||||
else {
|
||||
g_strlcat(str, "0", 256);
|
||||
(void) g_strlcat(str, "0", 256);
|
||||
}
|
||||
bit++;
|
||||
bit_offset++;
|
||||
|
@ -819,13 +819,13 @@ dissect_h265_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint
|
|||
*start_bit_offset = bit_offset;
|
||||
for (; bit % 8; bit++) {
|
||||
if (bit && (!(bit % 4))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
g_strlcat(str, ".", 256);
|
||||
(void) g_strlcat(str, ".", 256);
|
||||
}
|
||||
if (hf_field) {
|
||||
g_strlcat(str, " = ", 256);
|
||||
g_strlcat(str, hf_field->name, 256);
|
||||
(void) g_strlcat(str, " = ", 256);
|
||||
(void) g_strlcat(str, hf_field->name, 256);
|
||||
switch (descriptor) {
|
||||
case H265_SE_V:
|
||||
/* if the syntax element is coded as se(v),
|
||||
|
@ -925,26 +925,26 @@ dissect_h265_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint
|
|||
/* read the bits for the int */
|
||||
for (i = 0; i<leading_zero_bits; i++) {
|
||||
if (bit && (!(bit % 4))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
if (bit && (!(bit % 8))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
bit++;
|
||||
tmp = value & mask;
|
||||
if (tmp != 0) {
|
||||
g_strlcat(str, "1", 256);
|
||||
(void) g_strlcat(str, "1", 256);
|
||||
}
|
||||
else {
|
||||
g_strlcat(str, "0", 256);
|
||||
(void) g_strlcat(str, "0", 256);
|
||||
}
|
||||
mask = mask >> 1;
|
||||
}
|
||||
for (; bit % 8; bit++) {
|
||||
if (bit && (!(bit % 4))) {
|
||||
g_strlcat(str, " ", 256);
|
||||
(void) g_strlcat(str, " ", 256);
|
||||
}
|
||||
g_strlcat(str, ".", 256);
|
||||
(void) g_strlcat(str, ".", 256);
|
||||
}
|
||||
|
||||
switch (descriptor) {
|
||||
|
@ -966,11 +966,11 @@ dissect_h265_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint
|
|||
}
|
||||
|
||||
if (hf_field) {
|
||||
g_strlcat(str, " = ", 256);
|
||||
g_strlcat(str, hf_field->name, 256);
|
||||
(void) g_strlcat(str, " = ", 256);
|
||||
(void) g_strlcat(str, hf_field->name, 256);
|
||||
switch (descriptor) {
|
||||
case H265_SE_V:
|
||||
g_strlcat(str, "(se(v))", 256);
|
||||
(void) g_strlcat(str, "(se(v))", 256);
|
||||
/* if the syntax element is coded as se(v),
|
||||
* the value of the syntax element is derived by invoking the
|
||||
* mapping process for signed Exp-Golomb codes as specified in
|
||||
|
|
|
@ -231,7 +231,7 @@ dissect_h450_ros_Invoke(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!arg_next_tvb) { /* empty argument */
|
||||
arg_next_tvb = tvb_new_subset_length_caplen(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
|
@ -314,7 +314,7 @@ dissect_h450_ros_ReturnResult(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (actx->rose_ctx->d.code != -1) {
|
||||
if (!res_next_tvb) { /* empty result */
|
||||
|
@ -384,7 +384,7 @@ dissect_h450_ros_ReturnError(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!err_next_tvb) { /* empty error */
|
||||
err_next_tvb = tvb_new_subset_length_caplen(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
|
@ -412,7 +412,7 @@ dissect_h450_ros_GeneralProblem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a
|
|||
offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, &problem_val);
|
||||
|
||||
#line 50 "./asn1/h450-ros/h450-ros.cnf"
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_GeneralProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_GeneralProblem_vals), ""), 64);
|
||||
problem_str[64-1] = '\0';
|
||||
|
||||
return offset;
|
||||
|
@ -437,7 +437,7 @@ dissect_h450_ros_InvokeProblem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac
|
|||
offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, &problem_val);
|
||||
|
||||
#line 53 "./asn1/h450-ros/h450-ros.cnf"
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_InvokeProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_InvokeProblem_vals), ""), 64);
|
||||
problem_str[64-1] = '\0';
|
||||
|
||||
return offset;
|
||||
|
@ -457,7 +457,7 @@ dissect_h450_ros_ReturnResultProblem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx
|
|||
offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, &problem_val);
|
||||
|
||||
#line 56 "./asn1/h450-ros/h450-ros.cnf"
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_ReturnResultProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_ReturnResultProblem_vals), ""), 64);
|
||||
problem_str[64-1] = '\0';
|
||||
|
||||
return offset;
|
||||
|
@ -479,7 +479,7 @@ dissect_h450_ros_ReturnErrorProblem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
|
|||
offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, &problem_val);
|
||||
|
||||
#line 59 "./asn1/h450-ros/h450-ros.cnf"
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_ReturnErrorProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(h450_ros_ReturnErrorProblem_vals), ""), 64);
|
||||
problem_str[64-1] = '\0';
|
||||
|
||||
return offset;
|
||||
|
@ -536,7 +536,7 @@ dissect_h450_ros_Reject(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
|
|
@ -33615,15 +33615,15 @@ dissect_ieee80211_common(tvbuff_t *tvb, packet_info *pinfo,
|
|||
}
|
||||
|
||||
if (algorithm == PROTECTION_ALG_WEP) {
|
||||
g_strlcpy(wlan_stats.protection, "WEP", MAX_PROTECT_LEN);
|
||||
(void) g_strlcpy(wlan_stats.protection, "WEP", MAX_PROTECT_LEN);
|
||||
} else if (algorithm == PROTECTION_ALG_TKIP) {
|
||||
g_strlcpy(wlan_stats.protection, "TKIP", MAX_PROTECT_LEN);
|
||||
(void) g_strlcpy(wlan_stats.protection, "TKIP", MAX_PROTECT_LEN);
|
||||
} else if (algorithm == PROTECTION_ALG_CCMP || algorithm == PROTECTION_ALG_CCMP_256) {
|
||||
g_strlcpy(wlan_stats.protection, "CCMP", MAX_PROTECT_LEN);
|
||||
(void) g_strlcpy(wlan_stats.protection, "CCMP", MAX_PROTECT_LEN);
|
||||
} else if (algorithm == PROTECTION_ALG_GCMP || algorithm == PROTECTION_ALG_GCMP_256) {
|
||||
g_strlcpy(wlan_stats.protection, "GCMP", MAX_PROTECT_LEN);
|
||||
(void) g_strlcpy(wlan_stats.protection, "GCMP", MAX_PROTECT_LEN);
|
||||
} else {
|
||||
g_strlcpy(wlan_stats.protection, "Unknown", MAX_PROTECT_LEN);
|
||||
(void) g_strlcpy(wlan_stats.protection, "Unknown", MAX_PROTECT_LEN);
|
||||
}
|
||||
|
||||
/* protection header */
|
||||
|
@ -34909,7 +34909,7 @@ set_dot11decrypt_keys(void)
|
|||
|
||||
/* XXX - This just lops the end if the key off if it's too long.
|
||||
* Should we handle this more gracefully? */
|
||||
g_strlcpy(key.UserPwd.Passphrase, dk->key->str, DOT11DECRYPT_WPA_PASSPHRASE_MAX_LEN+1);
|
||||
(void) g_strlcpy(key.UserPwd.Passphrase, dk->key->str, DOT11DECRYPT_WPA_PASSPHRASE_MAX_LEN+1);
|
||||
|
||||
key.UserPwd.SsidLen = 0;
|
||||
if ((dk->ssid != NULL) && (dk->ssid->len <= DOT11DECRYPT_WPA_SSID_MAX_LEN))
|
||||
|
|
|
@ -1294,7 +1294,7 @@ static int ieee802_15_4_short_address_to_str(const address* addr, gchar *buf, in
|
|||
|
||||
if (ieee_802_15_4_short_addr == 0xffff)
|
||||
{
|
||||
g_strlcpy(buf, "Broadcast", buf_len);
|
||||
(void) g_strlcpy(buf, "Broadcast", buf_len);
|
||||
return 10;
|
||||
}
|
||||
|
||||
|
|
|
@ -992,13 +992,13 @@ dissect_ipopt_cipso(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
while (cat_str_len < (strlen(cat_str) + 2 + USHRT_MAX_STRLEN))
|
||||
cat_str_len += cat_str_len;
|
||||
cat_str_new = (char *)wmem_alloc(wmem_packet_scope(), cat_str_len);
|
||||
g_strlcpy(cat_str_new, cat_str, cat_str_len);
|
||||
(void) g_strlcpy(cat_str_new, cat_str, cat_str_len);
|
||||
cat_str_new[cat_str_len - 1] = '\0';
|
||||
cat_str = cat_str_new;
|
||||
}
|
||||
if (cat_str[0] != '\0')
|
||||
g_strlcat(cat_str, ",", cat_str_len);
|
||||
g_strlcat(cat_str, cat_str_tmp, cat_str_len);
|
||||
(void) g_strlcat(cat_str, ",", cat_str_len);
|
||||
(void) g_strlcat(cat_str, cat_str_tmp, cat_str_len);
|
||||
}
|
||||
bit_spot++;
|
||||
bitmask >>= 1;
|
||||
|
@ -1038,8 +1038,8 @@ dissect_ipopt_cipso(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
tvb_get_ntohs(tvb, offset));
|
||||
offset += 2;
|
||||
if (cat_str[0] != '\0')
|
||||
g_strlcat(cat_str, ",", USHRT_MAX_STRLEN * 15);
|
||||
g_strlcat(cat_str, cat_str_tmp, USHRT_MAX_STRLEN * 15);
|
||||
(void) g_strlcat(cat_str, ",", USHRT_MAX_STRLEN * 15);
|
||||
(void) g_strlcat(cat_str, cat_str_tmp, USHRT_MAX_STRLEN * 15);
|
||||
}
|
||||
|
||||
proto_tree_add_string(field_tree, hf_ip_cipso_categories, tvb, offset - taglen + 4, taglen - 4, cat_str);
|
||||
|
@ -1082,8 +1082,8 @@ dissect_ipopt_cipso(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
g_snprintf(cat_str_tmp, USHRT_MAX_STRLEN * 2, "%u", cat_high);
|
||||
|
||||
if (cat_str[0] != '\0')
|
||||
g_strlcat(cat_str, ",", USHRT_MAX_STRLEN * 16);
|
||||
g_strlcat(cat_str, cat_str_tmp, USHRT_MAX_STRLEN * 16);
|
||||
(void) g_strlcat(cat_str, ",", USHRT_MAX_STRLEN * 16);
|
||||
(void) g_strlcat(cat_str, cat_str_tmp, USHRT_MAX_STRLEN * 16);
|
||||
}
|
||||
|
||||
proto_tree_add_string(field_tree, hf_ip_cipso_categories, tvb, offset - taglen + 4, taglen - 4, cat_str);
|
||||
|
|
|
@ -1460,11 +1460,11 @@ ipp_fmt_collection(tvbuff_t *tvb, int valoffset, char *buffer, int bufsize)
|
|||
*bufptr++ = ',';
|
||||
|
||||
if ((bufend - bufptr) < value_length) {
|
||||
g_strlcpy(bufptr, "...", bufend - bufptr + 1);
|
||||
(void) g_strlcpy(bufptr, "...", bufend - bufptr + 1);
|
||||
overflow = 1;
|
||||
}
|
||||
else {
|
||||
g_strlcpy(bufptr, tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2, value_length), bufend - bufptr + 1);
|
||||
(void) g_strlcpy(bufptr, tvb_format_text(tvb, valoffset + 1 + 2 + name_length + 2, value_length), bufend - bufptr + 1);
|
||||
}
|
||||
|
||||
bufptr += strlen(bufptr);
|
||||
|
@ -1478,11 +1478,11 @@ ipp_fmt_collection(tvbuff_t *tvb, int valoffset, char *buffer, int bufsize)
|
|||
valoffset = ipp_fmt_collection(tvb, valoffset, temp, sizeof(temp));
|
||||
if (!overflow) {
|
||||
if ((bufend - bufptr) < (int)strlen(temp)) {
|
||||
g_strlcpy(bufptr, "...", bufend - bufptr + 1);
|
||||
(void) g_strlcpy(bufptr, "...", bufend - bufptr + 1);
|
||||
overflow = 1;
|
||||
}
|
||||
else {
|
||||
g_strlcpy(bufptr, temp, bufend - bufptr + 1);
|
||||
(void) g_strlcpy(bufptr, temp, bufend - bufptr + 1);
|
||||
}
|
||||
bufptr += strlen(bufptr);
|
||||
}
|
||||
|
|
|
@ -4212,7 +4212,7 @@ int dissect_mscldap_string(tvbuff_t *tvb, int offset, char *str, int max_len, gb
|
|||
|
||||
/* The name data MUST start at offset 0 of the tvb */
|
||||
compr_len = get_dns_name(tvb, offset, max_len, 0, &name, &name_len);
|
||||
g_strlcpy(str, name, max_len);
|
||||
(void) g_strlcpy(str, name, max_len);
|
||||
return offset + compr_len;
|
||||
}
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ lte_mac_pseudo_hdr(char* option_str, packet_info* pinfo, guint16 length, packet_
|
|||
}
|
||||
|
||||
/* Need to copy the string in a local buffer since strtok will modify it */
|
||||
g_strlcpy(option, option_str, 30);
|
||||
(void) g_strlcpy(option, option_str, 30);
|
||||
|
||||
/* Only need to set info once per session. */
|
||||
p_mac_lte_info = (struct mac_lte_info*)p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0);
|
||||
|
@ -368,7 +368,7 @@ lte_rlc_pseudo_hdr(char* option_str, packet_info* pinfo, guint16 length, packet_
|
|||
{
|
||||
proto_rlc_lte = proto_get_id_by_filter_name("rlc-lte");
|
||||
}
|
||||
g_strlcpy(option, option_str, 30);
|
||||
(void) g_strlcpy(option, option_str, 30);
|
||||
|
||||
/* Only need to set info once per session. */
|
||||
p_rlc_lte_info = (struct rlc_lte_info*)p_get_proto_data(wmem_file_scope(), pinfo, proto_rlc_lte, 0);
|
||||
|
@ -473,7 +473,7 @@ lte_pdcp_pseudo_hdr(char* option_str, packet_info* pinfo, guint16 length _U_, pa
|
|||
{
|
||||
proto_pdcp_lte = proto_get_id_by_filter_name("pdcp-lte");
|
||||
}
|
||||
g_strlcpy(option, option_str, 30);
|
||||
(void) g_strlcpy(option, option_str, 30);
|
||||
|
||||
/* Only need to set info once per session. */
|
||||
p_pdcp_lte_info = (struct pdcp_lte_info*)p_get_proto_data(wmem_file_scope(), pinfo, proto_pdcp_lte, 0);
|
||||
|
|
|
@ -3586,7 +3586,7 @@ megaco_fmt_content( gchar *result, guint32 context )
|
|||
case CHOOSE_CONTEXT:
|
||||
case ALL_CONTEXTS:
|
||||
case NULL_CONTEXT:
|
||||
g_strlcpy(result, val_to_str_const(context, megaco_context_vals, "Unknown"), ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcpy(result, val_to_str_const(context, megaco_context_vals, "Unknown"), ITEM_LABEL_LENGTH);
|
||||
break;
|
||||
default:
|
||||
g_snprintf( result, ITEM_LABEL_LENGTH, "%d", context);
|
||||
|
|
|
@ -1165,7 +1165,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
}
|
||||
|
||||
code = tvb_format_text(tvb, tvb_previous_offset, tokenlen);
|
||||
g_strlcpy(mi->code, code, 5);
|
||||
(void) g_strlcpy(mi->code, code, 5);
|
||||
if (is_mgcp_verb(tvb, tvb_previous_offset, tvb_current_len, &verb_description))
|
||||
{
|
||||
mgcp_type = MGCP_REQUEST;
|
||||
|
@ -1311,7 +1311,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
mi->request_available = TRUE;
|
||||
mgcp_call->responded = TRUE;
|
||||
mi->req_num = mgcp_call->req_num;
|
||||
g_strlcpy(mi->code, mgcp_call->code, 5);
|
||||
(void) g_strlcpy(mi->code, mgcp_call->code, 5);
|
||||
item = proto_tree_add_uint_format(tree, hf_mgcp_req_frame,
|
||||
tvb, 0, 0, mgcp_call->req_num,
|
||||
"This is a response to a request in frame %u",
|
||||
|
@ -1459,7 +1459,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
mgcp_call->transid = mi->transid;
|
||||
mgcp_call->responded = FALSE;
|
||||
mgcp_call->req_time=pinfo->abs_ts;
|
||||
g_strlcpy(mgcp_call->code, mi->code, 5);
|
||||
(void) g_strlcpy(mgcp_call->code, mi->code, 5);
|
||||
|
||||
/* Store it */
|
||||
wmem_map_insert(mgcp_calls, new_mgcp_call_key, mgcp_call);
|
||||
|
|
|
@ -1015,8 +1015,8 @@ static void
|
|||
private_data_add_moreCinfo_id(asn1_ctx_t *actx, tvbuff_t *tvb)
|
||||
{
|
||||
mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx);
|
||||
g_strlcat(private_data->moreCinfo, " ", BUFFER_SIZE_MORE);
|
||||
g_strlcat(private_data->moreCinfo, tvb_get_string_enc(wmem_packet_scope(),
|
||||
(void) g_strlcat(private_data->moreCinfo, " ", BUFFER_SIZE_MORE);
|
||||
(void) g_strlcat(private_data->moreCinfo, tvb_get_string_enc(wmem_packet_scope(),
|
||||
tvb, 2, tvb_get_guint8(tvb, 1), ENC_STRING), BUFFER_SIZE_MORE);
|
||||
}
|
||||
|
||||
|
|
|
@ -473,13 +473,13 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
|
|||
}
|
||||
|
||||
if ((label == MPLS_LABEL_GACH) && bos) {
|
||||
g_strlcpy(PW_ACH, "Generic Associated Channel Header",50);
|
||||
(void) g_strlcpy(PW_ACH, "Generic Associated Channel Header",50);
|
||||
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
call_dissector(dissector_pw_ach, next_tvb, pinfo, tree );
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
else
|
||||
g_strlcpy(PW_ACH, "PW Associated Channel Header",50);
|
||||
(void) g_strlcpy(PW_ACH, "PW Associated Channel Header",50);
|
||||
|
||||
if (bos)
|
||||
break;
|
||||
|
|
|
@ -198,7 +198,7 @@ msrp_add_address( packet_info *pinfo,
|
|||
* Update the conversation data.
|
||||
*/
|
||||
p_conv_data->setup_method_set = TRUE;
|
||||
g_strlcpy(p_conv_data->setup_method, setup_method, MAX_MSRP_SETUP_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_conv_data->setup_method, setup_method, MAX_MSRP_SETUP_METHOD_SIZE);
|
||||
p_conv_data->setup_frame_number = setup_frame_number;
|
||||
}
|
||||
|
||||
|
|
|
@ -654,9 +654,9 @@ dissect_nbns_answer(tvbuff_t *tvb, packet_info *pinfo, int offset, int nbns_data
|
|||
(cur_offset - offset) + data_len,
|
||||
ett_nbns_rr, NULL, "%s: type %s, class %s",
|
||||
name, type_name, class_name);
|
||||
g_strlcat(name, " (", MAX_NAME_LEN);
|
||||
g_strlcat(name, netbios_name_type_descr(name_type), MAX_NAME_LEN);
|
||||
g_strlcat(name, ")", MAX_NAME_LEN);
|
||||
(void) g_strlcat(name, " (", MAX_NAME_LEN);
|
||||
(void) g_strlcat(name, netbios_name_type_descr(name_type), MAX_NAME_LEN);
|
||||
(void) g_strlcat(name, ")", MAX_NAME_LEN);
|
||||
add_rr_to_tree(rr_tree, tvb, offset, name,
|
||||
name_len, type, dns_class, ttl, data_len);
|
||||
}
|
||||
|
|
|
@ -153,103 +153,103 @@ process_flags(proto_tree *sss_tree, tvbuff_t *tvb, guint32 foffset)
|
|||
flags = tvb_get_ntohl(tvb, foffset);
|
||||
for (i = 0 ; i < 256; i++) {
|
||||
if (flags & bvalue) {
|
||||
g_strlcat(flags_str, sep, 1024);
|
||||
(void) g_strlcat(flags_str, sep, 1024);
|
||||
switch(bvalue) {
|
||||
case 0x00000001:
|
||||
g_strlcat(flags_str, "Enhanced Protection", 1024);
|
||||
(void) g_strlcat(flags_str, "Enhanced Protection", 1024);
|
||||
break;
|
||||
case 0x00000002:
|
||||
g_strlcat(flags_str, "Create ID", 1024);
|
||||
(void) g_strlcat(flags_str, "Create ID", 1024);
|
||||
break;
|
||||
case 0x00000004:
|
||||
g_strlcat(flags_str, "Remove Lock", 1024);
|
||||
(void) g_strlcat(flags_str, "Remove Lock", 1024);
|
||||
break;
|
||||
case 0x00000008:
|
||||
g_strlcat(flags_str, "Repair", 1024);
|
||||
(void) g_strlcat(flags_str, "Repair", 1024);
|
||||
break;
|
||||
case 0x00000010:
|
||||
g_strlcat(flags_str, "Unicode", 1024);
|
||||
(void) g_strlcat(flags_str, "Unicode", 1024);
|
||||
break;
|
||||
case 0x00000020:
|
||||
g_strlcat(flags_str, "EP Master Password Used", 1024);
|
||||
(void) g_strlcat(flags_str, "EP Master Password Used", 1024);
|
||||
break;
|
||||
case 0x00000040:
|
||||
g_strlcat(flags_str, "EP Password Used", 1024);
|
||||
(void) g_strlcat(flags_str, "EP Password Used", 1024);
|
||||
break;
|
||||
case 0x00000080:
|
||||
g_strlcat(flags_str, "Set Tree Name", 1024);
|
||||
(void) g_strlcat(flags_str, "Set Tree Name", 1024);
|
||||
break;
|
||||
case 0x00000100:
|
||||
g_strlcat(flags_str, "Get Context", 1024);
|
||||
(void) g_strlcat(flags_str, "Get Context", 1024);
|
||||
break;
|
||||
case 0x00000200:
|
||||
g_strlcat(flags_str, "Destroy Context", 1024);
|
||||
(void) g_strlcat(flags_str, "Destroy Context", 1024);
|
||||
break;
|
||||
case 0x00000400:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x00000800:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x00001000:
|
||||
g_strlcat(flags_str, "EP Lock", 1024);
|
||||
(void) g_strlcat(flags_str, "EP Lock", 1024);
|
||||
break;
|
||||
case 0x00002000:
|
||||
g_strlcat(flags_str, "Not Initialized", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Initialized", 1024);
|
||||
break;
|
||||
case 0x00004000:
|
||||
g_strlcat(flags_str, "Enhanced Protection", 1024);
|
||||
(void) g_strlcat(flags_str, "Enhanced Protection", 1024);
|
||||
break;
|
||||
case 0x00008000:
|
||||
g_strlcat(flags_str, "Store Not Synced", 1024);
|
||||
(void) g_strlcat(flags_str, "Store Not Synced", 1024);
|
||||
break;
|
||||
case 0x00010000:
|
||||
g_strlcat(flags_str, "Admin Last Modified", 1024);
|
||||
(void) g_strlcat(flags_str, "Admin Last Modified", 1024);
|
||||
break;
|
||||
case 0x00020000:
|
||||
g_strlcat(flags_str, "EP Password Present", 1024);
|
||||
(void) g_strlcat(flags_str, "EP Password Present", 1024);
|
||||
break;
|
||||
case 0x00040000:
|
||||
g_strlcat(flags_str, "EP Master Password Present", 1024);
|
||||
(void) g_strlcat(flags_str, "EP Master Password Present", 1024);
|
||||
break;
|
||||
case 0x00080000:
|
||||
g_strlcat(flags_str, "MP Disabled", 1024);
|
||||
(void) g_strlcat(flags_str, "MP Disabled", 1024);
|
||||
break;
|
||||
case 0x00100000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x00200000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x00400000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x00800000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x01000000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x02000000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x04000000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x08000000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x10000000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x20000000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x40000000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
case 0x80000000:
|
||||
g_strlcat(flags_str, "Not Defined", 1024);
|
||||
(void) g_strlcat(flags_str, "Not Defined", 1024);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -2117,7 +2117,7 @@ ncp_hash_insert(conversation_t *conversation, guint8 nw_sequence,
|
|||
request_value->req_nds_flags = 0;
|
||||
request_value->nds_request_verb = 0;
|
||||
request_value->nds_version = 0;
|
||||
g_strlcpy(request_value->object_name, "", 256);
|
||||
(void) g_strlcpy(request_value->object_name, "", 256);
|
||||
request_value->nds_frag = TRUE;
|
||||
|
||||
wmem_map_insert(ncp_req_hash, request_key, request_value);
|
||||
|
@ -2137,7 +2137,7 @@ ncp_eid_hash_insert(guint32 nw_eid)
|
|||
request_eid_key->nw_eid = nw_eid;
|
||||
|
||||
request_eid_value = wmem_new0(wmem_file_scope(), ncp_req_eid_hash_value);
|
||||
g_strlcpy(request_eid_value->object_name, "", 256);
|
||||
(void) g_strlcpy(request_eid_value->object_name, "", 256);
|
||||
|
||||
wmem_map_insert(ncp_req_eid_hash, request_eid_key, request_eid_value);
|
||||
|
||||
|
@ -5253,7 +5253,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds
|
|||
ioffset = ioffset + 4;
|
||||
ioffset = print_es_type(estree, tvb, values, value3, ioffset);
|
||||
/* values.vstring is being overwritten. So store the resolve name to a global value */
|
||||
g_strlcpy(mv_resolve_name_string, values->vstring, 128);
|
||||
(void) g_strlcpy(mv_resolve_name_string, values->vstring, 128);
|
||||
value4 = tvb_get_letohl(tvb, ioffset);
|
||||
aitem = proto_tree_add_uint_format(ntree, hf_referral_record, tvb, ioffset, 4,
|
||||
value4, "Referral Protocols - %u", value4);
|
||||
|
@ -7961,7 +7961,7 @@ dissect_nds_reply(tvbuff_t *tvb, packet_info *pinfo,
|
|||
if (!request_eid_value) {
|
||||
request_eid_value = ncp_eid_hash_insert(global_eid);
|
||||
if (global_object_name != NULL)
|
||||
g_strlcpy(request_eid_value->object_name, global_object_name, 256);
|
||||
(void) g_strlcpy(request_eid_value->object_name, global_object_name, 256);
|
||||
else
|
||||
request_eid_value->object_name[0] = '\0';
|
||||
}
|
||||
|
@ -8509,7 +8509,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name);
|
||||
if (!pinfo->fd->visited) {
|
||||
if (request_value)
|
||||
g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
(void) g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
}
|
||||
foffset += 4+value1;
|
||||
foffset += align_4(tvb, foffset);
|
||||
|
@ -8563,7 +8563,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name);
|
||||
if (!pinfo->fd->visited) {
|
||||
if (request_value)
|
||||
g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
(void) g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
}
|
||||
foffset += 4+value1;
|
||||
foffset += align_4(tvb, foffset);
|
||||
|
@ -8719,7 +8719,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name);
|
||||
if (!pinfo->fd->visited) {
|
||||
if (request_value)
|
||||
g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
(void) g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
}
|
||||
foffset += 4+value1;
|
||||
foffset += align_4(tvb, foffset);
|
||||
|
@ -8863,7 +8863,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name);
|
||||
if (!pinfo->fd->visited) {
|
||||
if (request_value)
|
||||
g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
(void) g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
}
|
||||
foffset += 4+value1;
|
||||
foffset += align_4(tvb, foffset);
|
||||
|
@ -8942,7 +8942,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name);
|
||||
if (!pinfo->fd->visited) {
|
||||
if (request_value)
|
||||
g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
(void) g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
}
|
||||
foffset += 4+value1;
|
||||
foffset += align_4(tvb, foffset);
|
||||
|
@ -8972,7 +8972,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name);
|
||||
if (!pinfo->fd->visited) {
|
||||
if (request_value)
|
||||
g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
(void) g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
}
|
||||
break;
|
||||
case 0x0e: /* Not Defined */
|
||||
|
@ -9018,7 +9018,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name);
|
||||
if (!pinfo->fd->visited) {
|
||||
if (request_value)
|
||||
g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
(void) g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
}
|
||||
foffset += 4+value1;
|
||||
foffset += align_4(tvb, foffset);
|
||||
|
@ -9044,7 +9044,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name);
|
||||
if (!pinfo->fd->visited) {
|
||||
if (request_value)
|
||||
g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
(void) g_strlcpy(request_value->object_name, global_object_name, 256);
|
||||
}
|
||||
break;
|
||||
case 0x12:
|
||||
|
|
|
@ -340,9 +340,9 @@ _fill_label_value_string_bitmask(char *label, guint32 value, const value_string
|
|||
if (value & vals->value) {
|
||||
value &= ~(vals->value);
|
||||
if (label[0])
|
||||
g_strlcat(label, ", ", ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcat(label, ", ", ITEM_LABEL_LENGTH);
|
||||
|
||||
g_strlcat(label, vals->strptr, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcat(label, vals->strptr, ITEM_LABEL_LENGTH);
|
||||
}
|
||||
|
||||
vals++;
|
||||
|
@ -350,9 +350,9 @@ _fill_label_value_string_bitmask(char *label, guint32 value, const value_string
|
|||
|
||||
if (value) {
|
||||
if (label[0])
|
||||
g_strlcat(label, ", ", ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcat(label, ", ", ITEM_LABEL_LENGTH);
|
||||
g_snprintf(tmp, sizeof(tmp), "0x%x", value);
|
||||
g_strlcat(label, tmp, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcat(label, tmp, ITEM_LABEL_LENGTH);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -412,7 +412,7 @@ hfi_netlink_route_ifi_flags_label(char *label, guint32 value)
|
|||
_fill_label_value_string_bitmask(label, value, iff_vals);
|
||||
|
||||
g_snprintf(tmp, sizeof(tmp), " (0x%.8x)", value);
|
||||
g_strlcat(label, tmp, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcat(label, tmp, ITEM_LABEL_LENGTH);
|
||||
}
|
||||
|
||||
static header_field_info hfi_netlink_route_ifi_flags NETLINK_ROUTE_HFI_INIT =
|
||||
|
@ -932,7 +932,7 @@ hfi_netlink_route_ifa_flags_label(char *label, guint32 value)
|
|||
_fill_label_value_string_bitmask(label, value, iff_vals);
|
||||
|
||||
g_snprintf(tmp, sizeof(tmp), " (0x%.8x)", value);
|
||||
g_strlcat(label, tmp, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcat(label, tmp, ITEM_LABEL_LENGTH);
|
||||
}
|
||||
|
||||
static header_field_info hfi_netlink_route_ifa_flags NETLINK_ROUTE_HFI_INIT =
|
||||
|
@ -1270,7 +1270,7 @@ hfi_netlink_route_nd_states_label(char *label, guint32 value)
|
|||
_fill_label_value_string_bitmask(label, value, flags_vals);
|
||||
|
||||
g_snprintf(tmp, sizeof(tmp), " (0x%.4x)", value);
|
||||
g_strlcat(label, tmp, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcat(label, tmp, ITEM_LABEL_LENGTH);
|
||||
}
|
||||
|
||||
static header_field_info hfi_netlink_route_nd_state NETLINK_ROUTE_HFI_INIT =
|
||||
|
|
|
@ -292,7 +292,7 @@ dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!arg_next_tvb) { /* empty argument */
|
||||
arg_next_tvb = tvb_new_subset_length_caplen(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
|
@ -385,7 +385,7 @@ dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (actx->rose_ctx->d.code != -1) {
|
||||
if (!res_next_tvb) { /* empty result */
|
||||
|
@ -465,7 +465,7 @@ dissect_q932_ros_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
if (!err_next_tvb) { /* empty error */
|
||||
err_next_tvb = tvb_new_subset_length_caplen(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
|
||||
|
@ -494,7 +494,7 @@ dissect_q932_ros_GeneralProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
|
|||
&problem_val);
|
||||
|
||||
#line 53 "./asn1/q932-ros/q932-ros.cnf"
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_GeneralProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_GeneralProblem_vals), ""), 64);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -519,7 +519,7 @@ dissect_q932_ros_InvokeProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
&problem_val);
|
||||
|
||||
#line 55 "./asn1/q932-ros/q932-ros.cnf"
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_InvokeProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_InvokeProblem_vals), ""), 64);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ dissect_q932_ros_ReturnResultProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U
|
|||
&problem_val);
|
||||
|
||||
#line 57 "./asn1/q932-ros/q932-ros.cnf"
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_ReturnResultProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_ReturnResultProblem_vals), ""), 64);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -561,7 +561,7 @@ dissect_q932_ros_ReturnErrorProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_
|
|||
&problem_val);
|
||||
|
||||
#line 59 "./asn1/q932-ros/q932-ros.cnf"
|
||||
g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_ReturnErrorProblem_vals), ""), 64);
|
||||
(void) g_strlcpy(problem_str, val_to_str_const(problem_val, VALS(q932_ros_ReturnErrorProblem_vals), ""), 64);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -617,7 +617,7 @@ dissect_q932_ros_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
|
|||
if (actx->rose_ctx->fillin_info)
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
|
||||
if (actx->rose_ctx->fillin_ptr)
|
||||
g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
(void) g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
|
|
@ -478,8 +478,8 @@ dissect_quakeworld_ConnectionlessPacket(tvbuff_t *tvb, packet_info *pinfo,
|
|||
}
|
||||
remaining[0] = '\0';
|
||||
for (i=2; i<Cmd_Argc() ; i++) {
|
||||
g_strlcat (remaining, Cmd_Argv(i), MAX_TEXT_SIZE+1);
|
||||
g_strlcat (remaining, " ", MAX_TEXT_SIZE+1);
|
||||
(void) g_strlcat (remaining, Cmd_Argv(i), MAX_TEXT_SIZE+1);
|
||||
(void) g_strlcat (remaining, " ", MAX_TEXT_SIZE+1);
|
||||
}
|
||||
if (text_tree) {
|
||||
proto_tree_add_string(argument_tree,
|
||||
|
|
|
@ -258,7 +258,7 @@ void rdt_add_address(packet_info *pinfo,
|
|||
}
|
||||
|
||||
/* Update the conversation data. */
|
||||
g_strlcpy(p_conv_data->method, setup_method, MAX_RDT_SETUP_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_conv_data->method, setup_method, MAX_RDT_SETUP_METHOD_SIZE);
|
||||
p_conv_data->frame_number = pinfo->num;
|
||||
p_conv_data->feature_level = rdt_feature_level;
|
||||
}
|
||||
|
@ -1196,7 +1196,7 @@ static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
/* Save this conversation info into packet info */
|
||||
p_conv_packet_data = wmem_new(wmem_file_scope(), struct _rdt_conversation_info);
|
||||
g_strlcpy(p_conv_packet_data->method, p_conv_data->method, MAX_RDT_SETUP_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_conv_packet_data->method, p_conv_data->method, MAX_RDT_SETUP_METHOD_SIZE);
|
||||
p_conv_packet_data->frame_number = p_conv_data->frame_number;
|
||||
p_conv_packet_data->feature_level = p_conv_data->feature_level;
|
||||
p_add_proto_data(wmem_file_scope(), pinfo, proto_rdt, 0, p_conv_packet_data);
|
||||
|
|
|
@ -935,7 +935,7 @@ void srtcp_add_address( packet_info *pinfo,
|
|||
* Update the conversation data.
|
||||
*/
|
||||
p_conv_data->setup_method_set = TRUE;
|
||||
g_strlcpy(p_conv_data->setup_method, setup_method, MAX_RTCP_SETUP_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_conv_data->setup_method, setup_method, MAX_RTCP_SETUP_METHOD_SIZE);
|
||||
p_conv_data->setup_frame_number = setup_frame_number;
|
||||
p_conv_data->srtcp_info = srtcp_info;
|
||||
}
|
||||
|
|
|
@ -1014,7 +1014,7 @@ bluetooth_add_address(packet_info *pinfo, address *addr, guint32 stream_number,
|
|||
/* Free the hash if already exists */
|
||||
rtp_dyn_payload_free(p_conv_data->rtp_dyn_payload);
|
||||
|
||||
g_strlcpy(p_conv_data->method, setup_method, MAX_RTP_SETUP_METHOD_SIZE+1);
|
||||
(void) g_strlcpy(p_conv_data->method, setup_method, MAX_RTP_SETUP_METHOD_SIZE+1);
|
||||
p_conv_data->frame_number = setup_frame_number;
|
||||
p_conv_data->media_types = media_types;
|
||||
p_conv_data->rtp_dyn_payload = NULL;
|
||||
|
@ -1153,7 +1153,7 @@ srtp_add_address(packet_info *pinfo, const port_type ptype, address *addr, int p
|
|||
DPRINT(("passed-in rtp_dyn_payload is the same as in the conversation"));
|
||||
}
|
||||
|
||||
g_strlcpy(p_conv_data->method, setup_method, MAX_RTP_SETUP_METHOD_SIZE+1);
|
||||
(void) g_strlcpy(p_conv_data->method, setup_method, MAX_RTP_SETUP_METHOD_SIZE+1);
|
||||
p_conv_data->frame_number = setup_frame_number;
|
||||
p_conv_data->media_types = media_types;
|
||||
p_conv_data->srtp_info = srtp_info;
|
||||
|
@ -1249,7 +1249,7 @@ dissect_rtp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
|
|||
p_conv_data->rtp_conv_info->multisegment_pdus = wmem_tree_new(wmem_file_scope());
|
||||
conversation_add_proto_data(p_conv, proto_rtp, p_conv_data);
|
||||
}
|
||||
g_strlcpy(p_conv_data->method, "HEUR RTP", MAX_RTP_SETUP_METHOD_SIZE+1);
|
||||
(void) g_strlcpy(p_conv_data->method, "HEUR RTP", MAX_RTP_SETUP_METHOD_SIZE+1);
|
||||
p_conv_data->frame_number = pinfo->num;
|
||||
p_conv_data->media_types = 0;
|
||||
p_conv_data->srtp_info = NULL;
|
||||
|
@ -2550,7 +2550,7 @@ get_conv_info(packet_info *pinfo, struct _rtp_info *rtp_info)
|
|||
/* Save this conversation info into packet info */
|
||||
/* XXX: why is this file pool not pinfo->pool? */
|
||||
p_conv_packet_data = wmem_new(wmem_file_scope(), struct _rtp_conversation_info);
|
||||
g_strlcpy(p_conv_packet_data->method, p_conv_data->method, MAX_RTP_SETUP_METHOD_SIZE+1);
|
||||
(void) g_strlcpy(p_conv_packet_data->method, p_conv_data->method, MAX_RTP_SETUP_METHOD_SIZE+1);
|
||||
p_conv_packet_data->frame_number = p_conv_data->frame_number;
|
||||
p_conv_packet_data->media_types = p_conv_data->media_types;
|
||||
/* do not increment ref count for the rtp_dyn_payload */
|
||||
|
|
|
@ -3934,9 +3934,9 @@ static void rtps_util_add_timestamp_sec_and_fraction(proto_tree *tree,
|
|||
frac = tvb_get_guint32(tvb, offset+4, encoding);
|
||||
|
||||
if ((sec == 0x7fffffff) && (frac == 0xffffffff)) {
|
||||
g_strlcpy(tempBuffer, "INFINITE", MAX_TIMESTAMP_SIZE);
|
||||
(void) g_strlcpy(tempBuffer, "INFINITE", MAX_TIMESTAMP_SIZE);
|
||||
} else if ((sec == 0) && (frac == 0)) {
|
||||
g_strlcpy(tempBuffer, "0 sec", MAX_TIMESTAMP_SIZE);
|
||||
(void) g_strlcpy(tempBuffer, "0 sec", MAX_TIMESTAMP_SIZE);
|
||||
} else {
|
||||
absolute = (gdouble)sec + (gdouble)frac / ((gdouble)(0x80000000) * 2.0);
|
||||
g_snprintf(tempBuffer, MAX_TIMESTAMP_SIZE,
|
||||
|
@ -4228,7 +4228,7 @@ static gint rtps_util_add_typecode(proto_tree *tree, tvbuff_t *tvb, gint offset,
|
|||
++tk_id;
|
||||
}
|
||||
|
||||
g_strlcpy(type_name, rtps_util_typecode_id_to_string(tk_id), 40);
|
||||
(void) g_strlcpy(type_name, rtps_util_typecode_id_to_string(tk_id), 40);
|
||||
|
||||
/* Structure of the typecode data:
|
||||
*
|
||||
|
@ -4399,7 +4399,7 @@ static gint rtps_util_add_typecode(proto_tree *tree, tvbuff_t *tvb, gint offset,
|
|||
member_name, -1, NULL, ndds_40_hack);
|
||||
}
|
||||
/* Finally prints the name of the struct (if provided) */
|
||||
g_strlcpy(type_name, "}", 40);
|
||||
(void) g_strlcpy(type_name, "}", 40);
|
||||
break;
|
||||
|
||||
} /* end of case UNION */
|
||||
|
@ -4570,7 +4570,7 @@ static gint rtps_util_add_typecode(proto_tree *tree, tvbuff_t *tvb, gint offset,
|
|||
}
|
||||
}
|
||||
/* Finally prints the name of the struct (if provided) */
|
||||
g_strlcpy(type_name, "}", 40);
|
||||
(void) g_strlcpy(type_name, "}", 40);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4662,7 +4662,7 @@ static gint rtps_util_add_typecode(proto_tree *tree, tvbuff_t *tvb, gint offset,
|
|||
offset += 4;
|
||||
alias_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, alias_name_length, ENC_ASCII);
|
||||
offset += alias_name_length;
|
||||
g_strlcpy(type_name, alias_name, 40);
|
||||
(void) g_strlcpy(type_name, alias_name, 40);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4861,7 +4861,7 @@ static gint rtps_util_add_type_library_type(proto_tree *tree,
|
|||
long_number = tvb_get_guint32(tvb, offset_tmp, encoding);
|
||||
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset_tmp+4, long_number, ENC_ASCII);
|
||||
if (info)
|
||||
g_strlcpy(info->member_name, name, long_number);
|
||||
(void) g_strlcpy(info->member_name, name, long_number);
|
||||
|
||||
proto_item_append_text(tree, " %s", name);
|
||||
offset += member_length;
|
||||
|
@ -5037,13 +5037,13 @@ static gint rtps_util_add_type_member(proto_tree *tree,
|
|||
proto_item_append_text(tree, " %s (ID: %d)", name, member_id);
|
||||
if (member_object) {
|
||||
member_object->member_id = member_id;
|
||||
g_strlcpy(member_object->member_name, name, long_number < 256 ? long_number : 256);
|
||||
(void) g_strlcpy(member_object->member_name, name, long_number < 256 ? long_number : 256);
|
||||
member_object->type_id = member_type_id;
|
||||
}
|
||||
if (info && info->extensibility == EXTENSIBILITY_MUTABLE) {
|
||||
mutable_member_mapping * mutable_mapping = NULL;
|
||||
mutable_mapping = wmem_new(wmem_file_scope(), mutable_member_mapping);
|
||||
g_strlcpy(mutable_mapping->member_name, name, long_number < 256 ? long_number : 256);
|
||||
(void) g_strlcpy(mutable_mapping->member_name, name, long_number < 256 ? long_number : 256);
|
||||
mutable_mapping->struct_type_id = info->type_id;
|
||||
mutable_mapping->member_type_id = member_type_id;
|
||||
mutable_mapping->member_id = member_id;
|
||||
|
@ -5098,7 +5098,7 @@ static gint rtps_util_add_type_union_member(proto_tree *tree,
|
|||
union_member_mapping * mapping = NULL;
|
||||
|
||||
mapping = wmem_new(wmem_file_scope(), union_member_mapping);
|
||||
g_strlcpy(mapping->member_name, object.member_name, 256);
|
||||
(void) g_strlcpy(mapping->member_name, object.member_name, 256);
|
||||
mapping->member_type_id = object.type_id;
|
||||
mapping->discriminator = HASHMAP_DISCRIMINATOR_CONSTANT;
|
||||
mapping->union_type_id = union_type_id + mapping->discriminator;
|
||||
|
@ -5111,7 +5111,7 @@ static gint rtps_util_add_type_union_member(proto_tree *tree,
|
|||
union_member_mapping * mapping = NULL;
|
||||
|
||||
mapping = wmem_new(wmem_file_scope(), union_member_mapping);
|
||||
g_strlcpy(mapping->member_name, object.member_name, 256);
|
||||
(void) g_strlcpy(mapping->member_name, object.member_name, 256);
|
||||
mapping->member_type_id = object.type_id;
|
||||
mapping->discriminator = -1;
|
||||
mapping->union_type_id = union_type_id + mapping->discriminator;
|
||||
|
@ -5131,7 +5131,7 @@ static gint rtps_util_add_type_union_member(proto_tree *tree,
|
|||
ti = proto_tree_add_item(labels, hf_rtps_type_object_union_label, tvb, offset_tmp, 4, encoding);
|
||||
offset_tmp += 4;
|
||||
|
||||
g_strlcpy(mapping->member_name, object.member_name, 256);
|
||||
(void) g_strlcpy(mapping->member_name, object.member_name, 256);
|
||||
mapping->member_type_id = object.type_id;
|
||||
mapping->discriminator = discriminator_case;
|
||||
mapping->union_type_id = union_type_id + discriminator_case;
|
||||
|
@ -5733,13 +5733,13 @@ static void rtps_util_store_type_mapping(packet_info *pinfo _U_, tvbuff_t *tvb,
|
|||
break;
|
||||
}
|
||||
case TOPIC_INFO_ADD_TOPIC_NAME: {
|
||||
g_strlcpy(type_mapping_object->topic_name, value, MAX_TOPIC_AND_TYPE_LENGTH);
|
||||
(void) g_strlcpy(type_mapping_object->topic_name, value, MAX_TOPIC_AND_TYPE_LENGTH);
|
||||
type_mapping_object->fields_visited =
|
||||
type_mapping_object->fields_visited | TOPIC_INFO_ADD_TOPIC_NAME;
|
||||
break;
|
||||
}
|
||||
case TOPIC_INFO_ADD_TYPE_NAME: {
|
||||
g_strlcpy(type_mapping_object->type_name, value, MAX_TOPIC_AND_TYPE_LENGTH);
|
||||
(void) g_strlcpy(type_mapping_object->type_name, value, MAX_TOPIC_AND_TYPE_LENGTH);
|
||||
type_mapping_object->fields_visited =
|
||||
type_mapping_object->fields_visited | TOPIC_INFO_ADD_TYPE_NAME;
|
||||
break;
|
||||
|
|
|
@ -2667,14 +2667,14 @@ s7comm_add_timestamp_to_tree(tvbuff_t *tvb,
|
|||
static void
|
||||
make_registerflag_string(gchar *str, guint8 flags, gint max)
|
||||
{
|
||||
g_strlcpy(str, "", max);
|
||||
if (flags & 0x01) g_strlcat(str, "STW, ", max);
|
||||
if (flags & 0x02) g_strlcat(str, "ACCU1, ", max);
|
||||
if (flags & 0x04) g_strlcat(str, "ACCU2, ", max);
|
||||
if (flags & 0x08) g_strlcat(str, "AR1, ", max);
|
||||
if (flags & 0x10) g_strlcat(str, "AR2, ", max);
|
||||
if (flags & 0x20) g_strlcat(str, "DB1, ", max);
|
||||
if (flags & 0x40) g_strlcat(str, "DB2, ", max);
|
||||
(void) g_strlcpy(str, "", max);
|
||||
if (flags & 0x01) (void) g_strlcat(str, "STW, ", max);
|
||||
if (flags & 0x02) (void) g_strlcat(str, "ACCU1, ", max);
|
||||
if (flags & 0x04) (void) g_strlcat(str, "ACCU2, ", max);
|
||||
if (flags & 0x08) (void) g_strlcat(str, "AR1, ", max);
|
||||
if (flags & 0x10) (void) g_strlcat(str, "AR2, ", max);
|
||||
if (flags & 0x20) (void) g_strlcat(str, "DB1, ", max);
|
||||
if (flags & 0x40) (void) g_strlcat(str, "DB2, ", max);
|
||||
if (strlen(str) > 2)
|
||||
str[strlen(str) - 2 ] = '\0';
|
||||
}
|
||||
|
@ -5389,15 +5389,15 @@ s7comm_decode_message_service(tvbuff_t *tvb,
|
|||
proto_tree_add_item(data_tree, hf_s7comm_cpu_msgservice_req_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
offset += 1;
|
||||
|
||||
g_strlcpy(events_string, "", sizeof(events_string));
|
||||
if (events & 0x01) g_strlcat(events_string, "MODE,", sizeof(events_string)); /* Change in mode-transition: Stop, Run, by Push and Function-group=0, Subfunction: 0=Stop, 1=Warm Restart, 2=RUN */
|
||||
if (events & 0x02) g_strlcat(events_string, "SYS,", sizeof(events_string)); /* System diagnostics */
|
||||
if (events & 0x04) g_strlcat(events_string, "USR,", sizeof(events_string)); /* User-defined diagnostic messages */
|
||||
if (events & 0x08) g_strlcat(events_string, "-4-,", sizeof(events_string)); /* currently unknown flag */
|
||||
if (events & 0x10) g_strlcat(events_string, "-5-,", sizeof(events_string)); /* currently unknown flag */
|
||||
if (events & 0x20) g_strlcat(events_string, "-6-,", sizeof(events_string)); /* currently unknown flag */
|
||||
if (events & 0x40) g_strlcat(events_string, "-7-,", sizeof(events_string)); /* currently unknown flag */
|
||||
if (events & 0x80) g_strlcat(events_string, "ALM,", sizeof(events_string)); /* Program block message, type of message in additional field */
|
||||
(void) g_strlcpy(events_string, "", sizeof(events_string));
|
||||
if (events & 0x01) (void) g_strlcat(events_string, "MODE,", sizeof(events_string)); /* Change in mode-transition: Stop, Run, by Push and Function-group=0, Subfunction: 0=Stop, 1=Warm Restart, 2=RUN */
|
||||
if (events & 0x02) (void) g_strlcat(events_string, "SYS,", sizeof(events_string)); /* System diagnostics */
|
||||
if (events & 0x04) (void) g_strlcat(events_string, "USR,", sizeof(events_string)); /* User-defined diagnostic messages */
|
||||
if (events & 0x08) (void) g_strlcat(events_string, "-4-,", sizeof(events_string)); /* currently unknown flag */
|
||||
if (events & 0x10) (void) g_strlcat(events_string, "-5-,", sizeof(events_string)); /* currently unknown flag */
|
||||
if (events & 0x20) (void) g_strlcat(events_string, "-6-,", sizeof(events_string)); /* currently unknown flag */
|
||||
if (events & 0x40) (void) g_strlcat(events_string, "-7-,", sizeof(events_string)); /* currently unknown flag */
|
||||
if (events & 0x80) (void) g_strlcat(events_string, "ALM,", sizeof(events_string)); /* Program block message, type of message in additional field */
|
||||
if (strlen(events_string) > 2)
|
||||
events_string[strlen(events_string) - 1 ] = '\0';
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " SubscribedEvents=(%s)", events_string);
|
||||
|
|
|
@ -1756,12 +1756,12 @@ dissect_sccp_gt_address_information(tvbuff_t *tvb, packet_info *pinfo,
|
|||
even_signal = tvb_get_guint8(tvb, offset) & GT_EVEN_SIGNAL_MASK;
|
||||
even_signal >>= GT_EVEN_SIGNAL_SHIFT;
|
||||
|
||||
g_strlcat(gt_digits, val_to_str(odd_signal, sccp_address_signal_values,
|
||||
(void) g_strlcat(gt_digits, val_to_str(odd_signal, sccp_address_signal_values,
|
||||
"Unknown: %d"), GT_MAX_SIGNALS+1);
|
||||
|
||||
/* If the last signal is NOT filler */
|
||||
if (offset != (length - 1) || even_length == TRUE)
|
||||
g_strlcat(gt_digits, val_to_str(even_signal, sccp_address_signal_values,
|
||||
(void) g_strlcat(gt_digits, val_to_str(even_signal, sccp_address_signal_values,
|
||||
"Unknown: %d"), GT_MAX_SIGNALS+1);
|
||||
|
||||
offset += GT_SIGNAL_LENGTH;
|
||||
|
|
|
@ -2726,19 +2726,19 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
|||
|
||||
if (NULL != sdp_data.ed137_fid) {
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", sdp_data.ed137_fid);
|
||||
g_strlcat(sdp_pi->summary_str, sdp_data.ed137_fid, 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, sdp_data.ed137_fid, 50);
|
||||
}
|
||||
if (NULL != sdp_data.ed137_txrxmode) {
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", sdp_data.ed137_txrxmode);
|
||||
if (strlen(sdp_pi->summary_str))
|
||||
g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
g_strlcat(sdp_pi->summary_str, sdp_data.ed137_txrxmode, 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, sdp_data.ed137_txrxmode, 50);
|
||||
}
|
||||
if (NULL != sdp_data.ed137_type) {
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", sdp_data.ed137_type);
|
||||
if (strlen(sdp_pi->summary_str))
|
||||
g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
g_strlcat(sdp_pi->summary_str, sdp_data.ed137_type, 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, sdp_data.ed137_type, 50);
|
||||
}
|
||||
|
||||
/* Done parsing media description, no more need for the session-level details. */
|
||||
|
@ -2795,19 +2795,19 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
|||
media_desc->media.pt[j]);
|
||||
if (payload_type_str) {
|
||||
if (strlen(sdp_pi->summary_str))
|
||||
g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
g_strlcat(sdp_pi->summary_str, payload_type_str, 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, payload_type_str, 50);
|
||||
} else {
|
||||
char num_pt[10];
|
||||
g_snprintf(num_pt, 10, "%u", media_desc->media.pt[j]);
|
||||
if (strlen(sdp_pi->summary_str))
|
||||
g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
g_strlcat(sdp_pi->summary_str, num_pt, 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, num_pt, 50);
|
||||
}
|
||||
} else {
|
||||
if (strlen(sdp_pi->summary_str))
|
||||
g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
g_strlcat(sdp_pi->summary_str,
|
||||
(void) g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str,
|
||||
val_to_str_ext(media_desc->media.pt[j], &rtp_payload_type_short_vals_ext, "%u"),
|
||||
50);
|
||||
}
|
||||
|
@ -2819,8 +2819,8 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
|||
*/
|
||||
if ((media_desc->media_port != 0) && media_desc->proto == SDP_PROTO_T38) {
|
||||
if (strlen(sdp_pi->summary_str))
|
||||
g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
g_strlcat(sdp_pi->summary_str, "t38", 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, " ", 50);
|
||||
(void) g_strlcat(sdp_pi->summary_str, "t38", 50);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4074,7 +4074,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info
|
|||
return offset - orig_offset;
|
||||
}
|
||||
else {
|
||||
g_strlcpy(cseq_method, value+sub_value_offset, MAX_CSEQ_METHOD_SIZE);
|
||||
(void) g_strlcpy(cseq_method, value+sub_value_offset, MAX_CSEQ_METHOD_SIZE);
|
||||
|
||||
/* Add CSeq method to the tree */
|
||||
if (cseq_tree)
|
||||
|
@ -4173,7 +4173,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info
|
|||
proto_item *gen_item;
|
||||
|
||||
/* Store the Call-id */
|
||||
g_strlcpy(call_id, value, MAX_CALL_ID_SIZE);
|
||||
(void) g_strlcpy(call_id, value, MAX_CALL_ID_SIZE);
|
||||
stat_info->tap_call_id = wmem_strdup(wmem_packet_scope(), call_id);
|
||||
|
||||
/* Add 'Call-id' string item to tree */
|
||||
|
@ -5262,7 +5262,7 @@ guint sip_is_packet_resend(packet_info *pinfo,
|
|||
/* No packet entry found, consult global hash table */
|
||||
|
||||
/* Prepare the key */
|
||||
g_strlcpy(key.call_id, call_id, MAX_CALL_ID_SIZE);
|
||||
(void) g_strlcpy(key.call_id, call_id, MAX_CALL_ID_SIZE);
|
||||
|
||||
/* We're only using these addresses locally (for the hash lookup) so
|
||||
* there is no need to make a (g_malloc'd) copy of them.
|
||||
|
@ -5291,7 +5291,7 @@ guint sip_is_packet_resend(packet_info *pinfo,
|
|||
if (cseq_number != p_val->cseq)
|
||||
{
|
||||
p_val->cseq = cseq_number;
|
||||
g_strlcpy(p_val->method, cseq_method, MAX_CSEQ_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_val->method, cseq_method, MAX_CSEQ_METHOD_SIZE);
|
||||
p_val->transaction_state = nothing_seen;
|
||||
p_val->frame_number = 0;
|
||||
if (line_type == REQUEST_LINE)
|
||||
|
@ -5320,7 +5320,7 @@ guint sip_is_packet_resend(packet_info *pinfo,
|
|||
}
|
||||
|
||||
p_val->cseq = cseq_number;
|
||||
g_strlcpy(p_val->method, cseq_method, MAX_CSEQ_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_val->method, cseq_method, MAX_CSEQ_METHOD_SIZE);
|
||||
p_val->transaction_state = nothing_seen;
|
||||
if (line_type == REQUEST_LINE)
|
||||
{
|
||||
|
@ -5461,7 +5461,7 @@ guint sip_find_request(packet_info *pinfo,
|
|||
/* No packet entry found, consult global hash table */
|
||||
|
||||
/* Prepare the key */
|
||||
g_strlcpy(key.call_id, call_id, MAX_CALL_ID_SIZE);
|
||||
(void) g_strlcpy(key.call_id, call_id, MAX_CALL_ID_SIZE);
|
||||
|
||||
/* Looking for matching request, so reverse addresses for this lookup */
|
||||
set_address(&key.dest_address, pinfo->net_src.type, pinfo->net_src.len,
|
||||
|
@ -5575,7 +5575,7 @@ guint sip_find_invite(packet_info *pinfo,
|
|||
/* No packet entry found, consult global hash table */
|
||||
|
||||
/* Prepare the key */
|
||||
g_strlcpy(key.call_id, call_id, MAX_CALL_ID_SIZE);
|
||||
(void) g_strlcpy(key.call_id, call_id, MAX_CALL_ID_SIZE);
|
||||
|
||||
/* Looking for matching INVITE */
|
||||
set_address(&key.dest_address, pinfo->net_dst.type, pinfo->net_dst.len,
|
||||
|
|
|
@ -175,7 +175,7 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, co
|
|||
|
||||
fi_rid=(field_info *)gp_rids->pdata[num_rids-1];
|
||||
fi_name=(field_info *)gp_names->pdata[num_rids-1];
|
||||
g_strlcpy(sid_name_str, sid, 256);
|
||||
(void) g_strlcpy(sid_name_str, sid, 256);
|
||||
sid_name_str[len++]='-';
|
||||
g_snprintf(sid_name_str+len, 256-len, "%d",fi_rid->value.value.sinteger);
|
||||
add_sid_name_mapping(sid_name_str, fi_name->value.value.string);
|
||||
|
|
|
@ -1865,7 +1865,7 @@ get_unicode_or_ascii_string(tvbuff_t *tvb, int *offsetp,
|
|||
cur[copylen] = '\0';
|
||||
|
||||
if (overflow)
|
||||
g_strlcat(cur, "...",MAX_UNICODE_STR_LEN+3+1);
|
||||
(void) g_strlcat(cur, "...",MAX_UNICODE_STR_LEN+3+1);
|
||||
|
||||
string_len = *len;
|
||||
string = cur;
|
||||
|
@ -5941,7 +5941,7 @@ dissect_search_resume_key(tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
TRUE, TRUE, bcp);
|
||||
CHECK_STRING_SUBR(fn);
|
||||
/* ensure that it's null-terminated */
|
||||
g_strlcpy(fname, fn, 11+1);
|
||||
(void) g_strlcpy(fname, fn, 11+1);
|
||||
proto_tree_add_string(tree, hf_smb_file_name, tvb, offset, 11,
|
||||
fname);
|
||||
COUNT_BYTES_SUBR(fn_len);
|
||||
|
@ -6019,7 +6019,7 @@ dissect_search_dir_info(tvbuff_t *tvb, packet_info *pinfo,
|
|||
TRUE, TRUE, bcp);
|
||||
CHECK_STRING_SUBR(fn);
|
||||
/* ensure that it's null-terminated */
|
||||
g_strlcpy(fname, fn, 13+1);
|
||||
(void) g_strlcpy(fname, fn, 13+1);
|
||||
proto_tree_add_string(tree, hf_smb_file_name, tvb, offset, fn_len,
|
||||
fname);
|
||||
COUNT_BYTES_SUBR(fn_len);
|
||||
|
|
|
@ -883,7 +883,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
|
|||
|
||||
pi = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
|
||||
expert_add_info_format(actx->pinfo, pi, &ei_snmp_varbind_response, "%s",note);
|
||||
g_strlcpy (label, note, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcpy (label, note, ITEM_LABEL_LENGTH);
|
||||
goto set_label;
|
||||
}
|
||||
|
||||
|
|
|
@ -596,16 +596,16 @@ static void process_rule_option(Rule_t *rule, char *options, int option_start_of
|
|||
|
||||
if (colon_offset != 0) {
|
||||
/* Name and value */
|
||||
g_strlcpy(name, options+option_start_offset, colon_offset-option_start_offset);
|
||||
(void) g_strlcpy(name, options+option_start_offset, colon_offset-option_start_offset);
|
||||
if (options[colon_offset] == ' ') {
|
||||
spaces_after_colon = 1;
|
||||
}
|
||||
g_strlcpy(value, options+colon_offset+spaces_after_colon, options_end_offset-spaces_after_colon-colon_offset);
|
||||
(void) g_strlcpy(value, options+colon_offset+spaces_after_colon, options_end_offset-spaces_after_colon-colon_offset);
|
||||
value_length = (gint)strlen(value);
|
||||
}
|
||||
else {
|
||||
/* Just name */
|
||||
g_strlcpy(name, options+option_start_offset, options_end_offset-option_start_offset);
|
||||
(void) g_strlcpy(name, options+option_start_offset, options_end_offset-option_start_offset);
|
||||
}
|
||||
|
||||
/* Some rule options expect a number, parse it now. Note that any space
|
||||
|
|
|
@ -807,7 +807,7 @@ void sprt_add_address(packet_info *pinfo,
|
|||
}
|
||||
|
||||
/* Update the conversation data. */
|
||||
g_strlcpy(p_conv_data->method, setup_method, SPRT_CONV_MAX_SETUP_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_conv_data->method, setup_method, SPRT_CONV_MAX_SETUP_METHOD_SIZE);
|
||||
p_conv_data->frame_number = setup_frame_number;
|
||||
}
|
||||
|
||||
|
|
|
@ -1411,12 +1411,12 @@ dissect_global_title_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tr
|
|||
even_signal = tvb_get_guint8(parameter_tvb, offset) & GT_EVEN_SIGNAL_MASK;
|
||||
even_signal >>= GT_EVEN_SIGNAL_SHIFT;
|
||||
|
||||
g_strlcat(gt_digits, val_to_str_const(odd_signal, sccp_address_signal_values,
|
||||
(void) g_strlcat(gt_digits, val_to_str_const(odd_signal, sccp_address_signal_values,
|
||||
"Unknown"), GT_MAX_SIGNALS+1);
|
||||
|
||||
/* If the last signal is NOT filler */
|
||||
if (offset != (GLOBAL_TITLE_OFFSET + global_title_length - 1) || even_length == TRUE)
|
||||
g_strlcat(gt_digits, val_to_str_const(even_signal, sccp_address_signal_values,
|
||||
(void) g_strlcat(gt_digits, val_to_str_const(even_signal, sccp_address_signal_values,
|
||||
"Unknown"), GT_MAX_SIGNALS+1);
|
||||
|
||||
offset += GT_SIGNAL_LENGTH;
|
||||
|
|
|
@ -291,7 +291,7 @@ void t38_add_address(packet_info *pinfo,
|
|||
/*
|
||||
* Update the conversation data.
|
||||
*/
|
||||
g_strlcpy(p_conversation_data->setup_method, setup_method, MAX_T38_SETUP_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_conversation_data->setup_method, setup_method, MAX_T38_SETUP_METHOD_SIZE);
|
||||
p_conversation_data->setup_frame_number = setup_frame_number;
|
||||
p_conversation_data->src_t38_info.reass_ID = 0;
|
||||
p_conversation_data->src_t38_info.reass_start_seqnum = -1;
|
||||
|
@ -1043,7 +1043,7 @@ init_t38_info_conv(packet_info *pinfo)
|
|||
if (!p_t38_packet_conv) {
|
||||
/* copy the t38 conversation info to the packet t38 conversation */
|
||||
p_t38_packet_conv = wmem_new(wmem_file_scope(), t38_conv);
|
||||
g_strlcpy(p_t38_packet_conv->setup_method, p_t38_conv->setup_method, MAX_T38_SETUP_METHOD_SIZE);
|
||||
(void) g_strlcpy(p_t38_packet_conv->setup_method, p_t38_conv->setup_method, MAX_T38_SETUP_METHOD_SIZE);
|
||||
p_t38_packet_conv->setup_frame_number = p_t38_conv->setup_frame_number;
|
||||
|
||||
memcpy(&(p_t38_packet_conv->src_t38_info), &(p_t38_conv->src_t38_info), sizeof(t38_conv_info));
|
||||
|
|
|
@ -3184,7 +3184,7 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
*/
|
||||
if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) {
|
||||
/* Save the application context and the sub dissector */
|
||||
g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
(void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
p_tcap_context->oid_present=TRUE;
|
||||
if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
|
||||
p_tcap_context->subdissector_handle=subdissector_handle;
|
||||
|
@ -3838,7 +3838,7 @@ dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs
|
|||
/* ACN, changed, Fallback to lower version
|
||||
* and update the subdissector (purely formal)
|
||||
*/
|
||||
g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
(void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
if ((subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid))) {
|
||||
p_tcap_context->subdissector_handle = subdissector_handle;
|
||||
p_tcap_context->subdissector_present = TRUE;
|
||||
|
@ -3846,7 +3846,7 @@ dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs
|
|||
}
|
||||
} else {
|
||||
/* We do not have the OID in the TCAP context, so store it */
|
||||
g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
(void) g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid));
|
||||
p_tcap_context->oid_present = TRUE;
|
||||
/* Try to find a subdissector according to OID */
|
||||
if ((subdissector_handle
|
||||
|
|
|
@ -781,9 +781,9 @@ dissect_comport_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i
|
|||
int bit = ls & 1;
|
||||
if (bit) {
|
||||
if (print_count != 0) {
|
||||
g_strlcat(ls_buffer,", ",512);
|
||||
(void) g_strlcat(ls_buffer,", ",512);
|
||||
}
|
||||
g_strlcat(ls_buffer,linestate_bits[idx], 512);
|
||||
(void) g_strlcat(ls_buffer,linestate_bits[idx], 512);
|
||||
print_count++;
|
||||
}
|
||||
ls = ls >> 1;
|
||||
|
@ -813,9 +813,9 @@ dissect_comport_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i
|
|||
int bit = ms & 1;
|
||||
if (bit) {
|
||||
if (print_count != 0) {
|
||||
g_strlcat(ms_buffer,", ",256);
|
||||
(void) g_strlcat(ms_buffer,", ",256);
|
||||
}
|
||||
g_strlcat(ms_buffer,modemstate_bits[idx],256);
|
||||
(void) g_strlcat(ms_buffer,modemstate_bits[idx],256);
|
||||
print_count++;
|
||||
}
|
||||
ms = ms >> 1;
|
||||
|
|
|
@ -507,7 +507,7 @@ fill_enums_id_vals(FILE *file)
|
|||
first_entry = FALSE;
|
||||
}
|
||||
tpncp_enums_name_vals[enum_val] = wmem_strdup(wmem_epan_scope(), enum_name);
|
||||
g_strlcpy(enum_type, enum_name, MAX_TPNCP_DB_ENTRY_LEN);
|
||||
(void) g_strlcpy(enum_type, enum_name, MAX_TPNCP_DB_ENTRY_LEN);
|
||||
}
|
||||
tpncp_enums_id_vals[enum_val][i].strptr = wmem_strdup(wmem_epan_scope(), enum_str);
|
||||
tpncp_enums_id_vals[enum_val][i].value = enum_id;
|
||||
|
|
|
@ -1613,7 +1613,7 @@ static int usb_addr_to_str(const address* addr, gchar *buf, int buf_len _U_)
|
|||
const guint8 *addrp = (const guint8 *)addr->data;
|
||||
|
||||
if(pletoh32(&addrp[0])==0xffffffff){
|
||||
g_strlcpy(buf, "host", buf_len);
|
||||
(void) g_strlcpy(buf, "host", buf_len);
|
||||
} else {
|
||||
g_snprintf(buf, buf_len, "%d.%d.%d", pletoh16(&addrp[8]),
|
||||
pletoh32(&addrp[0]), pletoh32(&addrp[4]));
|
||||
|
|
|
@ -627,9 +627,9 @@ static int usbll_addr_to_str(const address* addr, gchar *buf, int buf_len)
|
|||
const usbll_address_t *addrp = (const usbll_address_t *)addr->data;
|
||||
|
||||
if (addrp->flags & USBLL_ADDRESS_HOST) {
|
||||
g_strlcpy(buf, "host", buf_len);
|
||||
(void) g_strlcpy(buf, "host", buf_len);
|
||||
} else if (addrp->flags & USBLL_ADDRESS_BROADCAST) {
|
||||
g_strlcpy(buf, "broadcast", buf_len);
|
||||
(void) g_strlcpy(buf, "broadcast", buf_len);
|
||||
} else if (addrp->flags & USBLL_ADDRESS_HUB_PORT) {
|
||||
/*
|
||||
* In split transaction we use : to mark that the last part is port not
|
||||
|
|
|
@ -102,7 +102,7 @@ static int vsock_addr_to_str(const address* addr, gchar *buf, int buf_len)
|
|||
const guint8 *addrp = (const guint8 *)addr->data;
|
||||
|
||||
if(pletoh64(&addrp[0])==2){
|
||||
g_strlcpy(buf, "host", buf_len);
|
||||
(void) g_strlcpy(buf, "host", buf_len);
|
||||
} else {
|
||||
g_snprintf(buf, buf_len, "%" G_GINT64_MODIFIER "u", pletoh64(&addrp[0]));
|
||||
}
|
||||
|
|
|
@ -720,8 +720,8 @@ dissect_x509if_T_type_02(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
|
|||
if(!name) name = actx->external.direct_reference;
|
||||
|
||||
if(last_rdn) { /* append it to the RDN */
|
||||
g_strlcat(last_rdn, name, MAX_RDN_STR_LEN);
|
||||
g_strlcat(last_rdn, "=", MAX_RDN_STR_LEN);
|
||||
(void) g_strlcat(last_rdn, name, MAX_RDN_STR_LEN);
|
||||
(void) g_strlcat(last_rdn, "=", MAX_RDN_STR_LEN);
|
||||
|
||||
/* append it to the tree */
|
||||
proto_item_append_text(tree, " (%s=", name);
|
||||
|
@ -776,7 +776,7 @@ dissect_x509if_T_atadv_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
|
|||
value = tvb_format_text(out_tvb, 0, tvb_reported_length(out_tvb));
|
||||
|
||||
if(last_rdn) {
|
||||
g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
|
||||
(void) g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
|
||||
|
||||
/* append it to the tree*/
|
||||
proto_item_append_text(tree, "%s)", value);
|
||||
|
@ -872,7 +872,7 @@ dissect_x509if_RelativeDistinguishedName_item(gboolean implicit_tag _U_, tvbuff_
|
|||
|
||||
if(last_rdn)
|
||||
/* this is an additional value - delimit */
|
||||
g_strlcat(last_rdn, "+", MAX_RDN_STR_LEN);
|
||||
(void) g_strlcat(last_rdn, "+", MAX_RDN_STR_LEN);
|
||||
}
|
||||
|
||||
offset = dissect_x509if_AttributeTypeAndDistinguishedValue(implicit_tag, tvb, offset, actx, tree, hf_index);
|
||||
|
@ -912,9 +912,9 @@ dissect_x509if_RelativeDistinguishedName(gboolean implicit_tag _U_, tvbuff_t *tv
|
|||
if(*last_dn) {
|
||||
temp_dn = (char *)wmem_strdup_printf(wmem_packet_scope(), "%s,%s", last_rdn, last_dn);
|
||||
last_dn[0] = '\0';
|
||||
g_strlcat(last_dn, temp_dn, MAX_DN_STR_LEN);
|
||||
(void) g_strlcat(last_dn, temp_dn, MAX_DN_STR_LEN);
|
||||
} else {
|
||||
g_strlcat(last_dn, last_rdn, MAX_DN_STR_LEN);
|
||||
(void) g_strlcat(last_dn, last_rdn, MAX_DN_STR_LEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -557,7 +557,7 @@ expert_set_info_vformat(packet_info *pinfo, proto_item *pi, int group, int sever
|
|||
if (use_vaformat) {
|
||||
vsnprintf(formatted, ITEM_LABEL_LENGTH, format, ap);
|
||||
} else {
|
||||
g_strlcpy(formatted, format, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcpy(formatted, format, ITEM_LABEL_LENGTH);
|
||||
}
|
||||
|
||||
tree = expert_create_tree(pi, group, severity, formatted);
|
||||
|
|
|
@ -93,7 +93,7 @@ oid_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_display _U_, char *buf,
|
|||
* I guess that is why this callback is not passed a length.
|
||||
* -- lego
|
||||
*/
|
||||
g_strlcpy(buf,oid_str,OID_REPR_LEN(fv));
|
||||
(void) g_strlcpy(buf,oid_str,OID_REPR_LEN(fv));
|
||||
wmem_free(NULL, oid_str);
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ rel_oid_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_display _U_, char *b
|
|||
* -- lego
|
||||
*/
|
||||
*buf++ = '.';
|
||||
g_strlcpy(buf,oid_str,REL_OID_REPR_LEN(fv));
|
||||
(void) g_strlcpy(buf,oid_str,REL_OID_REPR_LEN(fv));
|
||||
wmem_free(NULL, oid_str);
|
||||
}
|
||||
|
||||
|
|
|
@ -214,19 +214,19 @@ sfloat_ieee_11073_val_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_displa
|
|||
if (fv->value.sfloat_ieee_11073 >= 0x07FE && fv->value.sfloat_ieee_11073 <= 0x0802) {
|
||||
switch (fv->value.sfloat_ieee_11073) {
|
||||
case SFLOAT_VALUE_INFINITY_PLUS:
|
||||
g_strlcpy(buf, "+INFINITY", size);
|
||||
(void) g_strlcpy(buf, "+INFINITY", size);
|
||||
break;
|
||||
case SFLOAT_VALUE_NAN:
|
||||
g_strlcpy(buf, "NaN", size);
|
||||
(void) g_strlcpy(buf, "NaN", size);
|
||||
break;
|
||||
case SFLOAT_VALUE_NRES:
|
||||
g_strlcpy(buf, "NRes", size);
|
||||
(void) g_strlcpy(buf, "NRes", size);
|
||||
break;
|
||||
case SFLOAT_VALUE_RFU:
|
||||
g_strlcpy(buf, "RFU", size);
|
||||
(void) g_strlcpy(buf, "RFU", size);
|
||||
break;
|
||||
case SFLOAT_VALUE_INFINITY_MINUS:
|
||||
g_strlcpy(buf, "-INFINITY", size);
|
||||
(void) g_strlcpy(buf, "-INFINITY", size);
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
@ -910,19 +910,19 @@ float_ieee_11073_val_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_display
|
|||
if (fv->value.float_ieee_11073 >= 0x007FFFFE && fv->value.float_ieee_11073 <= 0x00800002) {
|
||||
switch (fv->value.float_ieee_11073) {
|
||||
case FLOAT_VALUE_INFINITY_PLUS:
|
||||
g_strlcpy(buf, "+INFINITY", size);
|
||||
(void) g_strlcpy(buf, "+INFINITY", size);
|
||||
break;
|
||||
case FLOAT_VALUE_NAN:
|
||||
g_strlcpy(buf, "NaN", size);
|
||||
(void) g_strlcpy(buf, "NaN", size);
|
||||
break;
|
||||
case FLOAT_VALUE_NRES:
|
||||
g_strlcpy(buf, "NRes", size);
|
||||
(void) g_strlcpy(buf, "NRes", size);
|
||||
break;
|
||||
case FLOAT_VALUE_RFU:
|
||||
g_strlcpy(buf, "RFU", size);
|
||||
(void) g_strlcpy(buf, "RFU", size);
|
||||
break;
|
||||
case FLOAT_VALUE_INFINITY_MINUS:
|
||||
g_strlcpy(buf, "-INFINITY", size);
|
||||
(void) g_strlcpy(buf, "-INFINITY", size);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ string_to_repr(fvalue_t *fv, ftrepr_t rtype, int field_display _U_, char *buf, u
|
|||
{
|
||||
switch (rtype) {
|
||||
case FTREPR_DISPLAY:
|
||||
g_strlcpy(buf, fv->value.string, size);
|
||||
(void) g_strlcpy(buf, fv->value.string, size);
|
||||
return;
|
||||
|
||||
case FTREPR_DFILTER:
|
||||
|
|
|
@ -363,7 +363,7 @@ absolute_val_to_repr(fvalue_t *fv, ftrepr_t rtype, int field_display, char *buf,
|
|||
*buf++ = '\"';
|
||||
}
|
||||
|
||||
g_strlcpy(buf, rep, size);
|
||||
(void) g_strlcpy(buf, rep, size);
|
||||
|
||||
if (rtype == FTREPR_DFILTER) {
|
||||
buf += strlen(rep);
|
||||
|
@ -391,7 +391,7 @@ relative_val_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_display _U_, ch
|
|||
{
|
||||
gchar *rep;
|
||||
rep = rel_time_to_secs_str(NULL, &fv->value.time);
|
||||
g_strlcpy(buf, rep, size);
|
||||
(void) g_strlcpy(buf, rep, size);
|
||||
wmem_free(NULL, rep);
|
||||
}
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ read_mmdbr_stdout_worker(gpointer data _U_) {
|
|||
if (line[0] == '[' && line_len > 2) {
|
||||
// [init] or resolved address in square brackets.
|
||||
line[line_len - 1] = '\0';
|
||||
g_strlcpy(cur_addr, line + 1, WS_INET6_ADDRSTRLEN);
|
||||
(void) g_strlcpy(cur_addr, line + 1, WS_INET6_ADDRSTRLEN);
|
||||
if (ws_inet_pton4(cur_addr, &response->ipv4_addr)) {
|
||||
response->is_ipv4 = TRUE;
|
||||
} else if (ws_inet_pton6(cur_addr, &response->ipv6_addr)) {
|
||||
|
|
|
@ -50,7 +50,7 @@ print_nsap_net_buf( const guint8 *ad, int length, gchar *buf, int buf_len)
|
|||
/* to do : NSAP / NET decoding */
|
||||
|
||||
if ( (length <= 0 ) || ( length > MAX_NSAP_LEN ) ) {
|
||||
g_strlcpy(buf, "<Invalid length of NSAP>", buf_len);
|
||||
(void) g_strlcpy(buf, "<Invalid length of NSAP>", buf_len);
|
||||
return;
|
||||
}
|
||||
cur = buf;
|
||||
|
@ -94,7 +94,7 @@ print_system_id_buf( const guint8 *ad, int length, gchar *buf, int buf_len)
|
|||
int tmp;
|
||||
|
||||
if ( ( length <= 0 ) || ( length > MAX_SYSTEMID_LEN ) ) {
|
||||
g_strlcpy(buf, "<Invalid length of SYSTEM ID>", buf_len);
|
||||
(void) g_strlcpy(buf, "<Invalid length of SYSTEM ID>", buf_len);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ print_address_prefix_buf(const guint8 *ad, int length, gchar *buf, int buf_len)
|
|||
/* to do : all real area decoding now: NET is assumed if id len is 1 more byte
|
||||
*/
|
||||
if (length <= 0 || length > MAX_AREA_LEN*2) {
|
||||
g_strlcpy(buf, "<Invalid length of AREA>", buf_len);
|
||||
(void) g_strlcpy(buf, "<Invalid length of AREA>", buf_len);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
12
epan/print.c
12
epan/print.c
|
@ -712,7 +712,7 @@ write_json_index(json_dumper *dumper, epan_dissect_t *edt)
|
|||
if (timeinfo != NULL) {
|
||||
strftime(ts, sizeof(ts), "%Y-%m-%d", timeinfo);
|
||||
} else {
|
||||
g_strlcpy(ts, "XXXX-XX-XX", sizeof(ts)); /* XXX - better way of saying "Not representable"? */
|
||||
(void) g_strlcpy(ts, "XXXX-XX-XX", sizeof(ts)); /* XXX - better way of saying "Not representable"? */
|
||||
}
|
||||
json_dumper_set_member_name(dumper, "_index");
|
||||
str = g_strdup_printf("packets-%s", ts);
|
||||
|
@ -1781,23 +1781,23 @@ print_escaped_xml(FILE *fh, const char *unescaped_string)
|
|||
for (p = unescaped_string; *p != '\0'; p++) {
|
||||
switch (*p) {
|
||||
case '&':
|
||||
g_strlcpy(&temp_buffer[offset], "&", ESCAPED_BUFFER_MAX-offset);
|
||||
(void) g_strlcpy(&temp_buffer[offset], "&", ESCAPED_BUFFER_MAX-offset);
|
||||
offset += 5;
|
||||
break;
|
||||
case '<':
|
||||
g_strlcpy(&temp_buffer[offset], "<", ESCAPED_BUFFER_MAX-offset);
|
||||
(void) g_strlcpy(&temp_buffer[offset], "<", ESCAPED_BUFFER_MAX-offset);
|
||||
offset += 4;
|
||||
break;
|
||||
case '>':
|
||||
g_strlcpy(&temp_buffer[offset], ">", ESCAPED_BUFFER_MAX-offset);
|
||||
(void) g_strlcpy(&temp_buffer[offset], ">", ESCAPED_BUFFER_MAX-offset);
|
||||
offset += 4;
|
||||
break;
|
||||
case '"':
|
||||
g_strlcpy(&temp_buffer[offset], """, ESCAPED_BUFFER_MAX-offset);
|
||||
(void) g_strlcpy(&temp_buffer[offset], """, ESCAPED_BUFFER_MAX-offset);
|
||||
offset += 6;
|
||||
break;
|
||||
case '\'':
|
||||
g_strlcpy(&temp_buffer[offset], "'", ESCAPED_BUFFER_MAX-offset);
|
||||
(void) g_strlcpy(&temp_buffer[offset], "'", ESCAPED_BUFFER_MAX-offset);
|
||||
offset += 6;
|
||||
break;
|
||||
default:
|
||||
|
|
20
epan/proto.c
20
epan/proto.c
|
@ -6763,7 +6763,7 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence,
|
|||
} else {
|
||||
number_out = hfinfo_char_value_format(hfinfo, number_buf, number);
|
||||
|
||||
g_strlcpy(expr+offset_e, number_out, size-offset_e);
|
||||
(void) g_strlcpy(expr+offset_e, number_out, size-offset_e);
|
||||
}
|
||||
|
||||
offset_e = (int)strlen(expr);
|
||||
|
@ -6797,7 +6797,7 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence,
|
|||
} else {
|
||||
number_out = hfinfo_numeric_value_format(hfinfo, number_buf, number);
|
||||
|
||||
g_strlcpy(expr+offset_e, number_out, size-offset_e);
|
||||
(void) g_strlcpy(expr+offset_e, number_out, size-offset_e);
|
||||
}
|
||||
|
||||
offset_e = (int)strlen(expr);
|
||||
|
@ -6827,7 +6827,7 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence,
|
|||
} else {
|
||||
number_out = hfinfo_numeric_value_format64(hfinfo, number_buf, number64);
|
||||
|
||||
g_strlcpy(expr+offset_e, number_out, size-offset_e);
|
||||
(void) g_strlcpy(expr+offset_e, number_out, size-offset_e);
|
||||
}
|
||||
|
||||
offset_e = (int)strlen(expr);
|
||||
|
@ -6895,7 +6895,7 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence,
|
|||
|
||||
default:
|
||||
/* for all others, just copy "result" to "expr" */
|
||||
g_strlcpy(expr, result, size);
|
||||
(void) g_strlcpy(expr, result, size);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -6999,13 +6999,13 @@ proto_item_prepend_text(proto_item *pi, const char *format, ...)
|
|||
ITEM_LABEL_NEW(PNODE_POOL(pi), fi->rep);
|
||||
proto_item_fill_label(fi, representation);
|
||||
} else
|
||||
g_strlcpy(representation, fi->rep->representation, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcpy(representation, fi->rep->representation, ITEM_LABEL_LENGTH);
|
||||
|
||||
va_start(ap, format);
|
||||
g_vsnprintf(fi->rep->representation,
|
||||
ITEM_LABEL_LENGTH, format, ap);
|
||||
va_end(ap);
|
||||
g_strlcat(fi->rep->representation, representation, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcat(fi->rep->representation, representation, ITEM_LABEL_LENGTH);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8965,7 +8965,7 @@ label_mark_truncated(char *label_str, gsize name_pos)
|
|||
*last_char = '\0';
|
||||
|
||||
} else if (name_pos < ITEM_LABEL_LENGTH)
|
||||
g_strlcpy(label_str + name_pos, trunc_str, ITEM_LABEL_LENGTH - name_pos);
|
||||
(void) g_strlcpy(label_str + name_pos, trunc_str, ITEM_LABEL_LENGTH - name_pos);
|
||||
}
|
||||
|
||||
static gsize
|
||||
|
@ -9042,7 +9042,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
|
|||
switch (hfinfo->type) {
|
||||
case FT_NONE:
|
||||
case FT_PROTOCOL:
|
||||
g_strlcpy(label_str, hfinfo->name, ITEM_LABEL_LENGTH);
|
||||
(void) g_strlcpy(label_str, hfinfo->name, ITEM_LABEL_LENGTH);
|
||||
break;
|
||||
|
||||
case FT_BOOLEAN:
|
||||
|
@ -12609,8 +12609,8 @@ _proto_tree_add_bits_format_value(proto_tree *tree, const int hfindex,
|
|||
|
||||
str = decode_bits_in_field(bit_offset, no_of_bits, value);
|
||||
|
||||
g_strlcat(str, " = ", 256+64);
|
||||
g_strlcat(str, hf_field->name, 256+64);
|
||||
(void) g_strlcat(str, " = ", 256+64);
|
||||
(void) g_strlcat(str, hf_field->name, 256+64);
|
||||
|
||||
/*
|
||||
* This function does not receive an actual value but a dimensionless pointer to that value.
|
||||
|
|
|
@ -329,7 +329,7 @@ guint32_to_str_buf(guint32 u, gchar *buf, int buf_len)
|
|||
gchar *bp = &buf[str_len];
|
||||
|
||||
if (buf_len < str_len) {
|
||||
g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len); /* Let the unexpected value alert user */
|
||||
(void) g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len); /* Let the unexpected value alert user */
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -346,7 +346,7 @@ guint64_to_str_buf(guint64 u, gchar *buf, int buf_len)
|
|||
gchar *bp = &buf[str_len];
|
||||
|
||||
if (buf_len < str_len) {
|
||||
g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len); /* Let the unexpected value alert user */
|
||||
(void) g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len); /* Let the unexpected value alert user */
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1034,7 +1034,7 @@ ip_to_str_buf(const guint8 *ad, gchar *buf, const int buf_len)
|
|||
register gchar *b=buf;
|
||||
|
||||
if (buf_len < WS_INET_ADDRSTRLEN) {
|
||||
g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len); /* Let the unexpected value alert user */
|
||||
(void) g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len); /* Let the unexpected value alert user */
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1115,7 +1115,7 @@ guid_to_str_buf(const e_guid_t *guid, gchar *buf, int buf_len)
|
|||
char *tempptr = buf;
|
||||
|
||||
if (buf_len < GUID_STR_LEN) {
|
||||
g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len);/* Let the unexpected value alert user */
|
||||
(void) g_strlcpy(buf, BUF_TOO_SMALL_ERR, buf_len);/* Let the unexpected value alert user */
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ wmem_strbuf_new(wmem_allocator_t *allocator, const gchar *str)
|
|||
strbuf = wmem_strbuf_sized_new(allocator, alloc_len, 0);
|
||||
|
||||
if (str && len > 0) {
|
||||
g_strlcpy(strbuf->str, str, alloc_len);
|
||||
(void) g_strlcpy(strbuf->str, str, alloc_len);
|
||||
strbuf->len = len;
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ wmem_strbuf_append(wmem_strbuf_t *strbuf, const gchar *str)
|
|||
|
||||
wmem_strbuf_grow(strbuf, append_len);
|
||||
|
||||
g_strlcpy(&strbuf->str[strbuf->len], str, strbuf->max_len ? WMEM_STRBUF_RAW_ROOM(strbuf) : append_len+1);
|
||||
(void) g_strlcpy(&strbuf->str[strbuf->len], str, strbuf->max_len ? WMEM_STRBUF_RAW_ROOM(strbuf) : append_len+1);
|
||||
|
||||
strbuf->len = MIN(strbuf->len + append_len, strbuf->alloc_len - 1);
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ static const char* cross_plat_fname(const char* fname) {
|
|||
static char fname_clean[256];
|
||||
char* f;
|
||||
|
||||
g_strlcpy(fname_clean,fname,255);
|
||||
(void) g_strlcpy(fname_clean,fname,255);
|
||||
fname_clean[255] = '\0';
|
||||
|
||||
for(f = fname_clean; *f; f++) {
|
||||
|
|
|
@ -329,7 +329,7 @@ WSLUA_FUNCTION wslua_apply_preferences(lua_State *L) {
|
|||
if (err) {
|
||||
/* Make a copy of pf_path because luaL_error() will return */
|
||||
gchar pf_path_copy[256];
|
||||
g_strlcpy(pf_path_copy, pf_path, sizeof pf_path_copy);
|
||||
(void) g_strlcpy(pf_path_copy, pf_path, sizeof pf_path_copy);
|
||||
g_free(pf_path);
|
||||
|
||||
return luaL_error(L, "can't open preferences file\n\"%s\": %s.",
|
||||
|
@ -355,7 +355,7 @@ char* wslua_get_actual_filename(const char* fname) {
|
|||
char* f;
|
||||
char* filename;
|
||||
|
||||
g_strlcpy(fname_clean,fname,255);
|
||||
(void) g_strlcpy(fname_clean,fname,255);
|
||||
fname_clean[255] = '\0';
|
||||
|
||||
for(f = fname_clean; *f; f++) {
|
||||
|
|
|
@ -428,19 +428,19 @@ static void SoeFormatter(tvbuff_t *tvb, gint offset, char *szText, gint nMax, gu
|
|||
SoEIdToString(tmp, soe.anSoeHeaderDataUnion.IDN, sizeof(tmp)-1);
|
||||
elm[0] = '\0';
|
||||
if ( soe.anSoeHeaderControlUnion.v.DataState )
|
||||
g_strlcat(elm, "D", 50);
|
||||
(void) g_strlcat(elm, "D", 50);
|
||||
if ( soe.anSoeHeaderControlUnion.v.Name )
|
||||
g_strlcat(elm, "N", 50);
|
||||
(void) g_strlcat(elm, "N", 50);
|
||||
if ( soe.anSoeHeaderControlUnion.v.Attribute )
|
||||
g_strlcat(elm, "A", 50);
|
||||
(void) g_strlcat(elm, "A", 50);
|
||||
if ( soe.anSoeHeaderControlUnion.v.Unit )
|
||||
g_strlcat(elm, "U", 50);
|
||||
(void) g_strlcat(elm, "U", 50);
|
||||
if ( soe.anSoeHeaderControlUnion.v.Min )
|
||||
g_strlcat(elm, "I", 50);
|
||||
(void) g_strlcat(elm, "I", 50);
|
||||
if ( soe.anSoeHeaderControlUnion.v.Max )
|
||||
g_strlcat(elm, "X", 50);
|
||||
(void) g_strlcat(elm, "X", 50);
|
||||
if ( soe.anSoeHeaderControlUnion.v.Value )
|
||||
g_strlcat(elm, "V", 50);
|
||||
(void) g_strlcat(elm, "V", 50);
|
||||
switch ( soe.anSoeHeaderControlUnion.v.OpCode )
|
||||
{
|
||||
case ECAT_SOE_OPCODE_RRQ:
|
||||
|
|
|
@ -257,15 +257,15 @@ static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, guint offset, packet_in
|
|||
|
||||
pv = tvb_get_guint8(tvb, offset+2);
|
||||
if (pv & IRCOMM_3_WIRE_RAW)
|
||||
g_strlcat(buf, ", 3-Wire raw", 256);
|
||||
(void) g_strlcat(buf, ", 3-Wire raw", 256);
|
||||
if (pv & IRCOMM_3_WIRE)
|
||||
g_strlcat(buf, ", 3-Wire", 256);
|
||||
(void) g_strlcat(buf, ", 3-Wire", 256);
|
||||
if (pv & IRCOMM_9_WIRE)
|
||||
g_strlcat(buf, ", 9-Wire", 256);
|
||||
(void) g_strlcat(buf, ", 9-Wire", 256);
|
||||
if (pv & IRCOMM_CENTRONICS)
|
||||
g_strlcat(buf, ", Centronics", 256);
|
||||
(void) g_strlcat(buf, ", Centronics", 256);
|
||||
|
||||
g_strlcat(buf, ")", 256);
|
||||
(void) g_strlcat(buf, ")", 256);
|
||||
|
||||
if (strlen(buf) > 2)
|
||||
proto_item_append_text(ti, "%s", buf+2);
|
||||
|
@ -279,11 +279,11 @@ static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, guint offset, packet_in
|
|||
|
||||
pv = tvb_get_guint8(tvb, offset+2);
|
||||
if (pv & IRCOMM_SERIAL)
|
||||
g_strlcat(buf, ", serial", 256);
|
||||
(void) g_strlcat(buf, ", serial", 256);
|
||||
if (pv & IRCOMM_PARALLEL)
|
||||
g_strlcat(buf, ", parallel", 256);
|
||||
(void) g_strlcat(buf, ", parallel", 256);
|
||||
|
||||
g_strlcat(buf, ")", 256);
|
||||
(void) g_strlcat(buf, ")", 256);
|
||||
|
||||
if (strlen(buf) > 2)
|
||||
proto_item_append_text(ti, "%s", buf+2);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue