| 3 |
* user_list_display |
* user_list_display |
| 4 |
* - display user information |
* - display user information |
| 5 |
* |
* |
| 6 |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
* Copyright (C) 2004-2026 Leaflet <leaflet@leafok.com> |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
| 67 |
|
|
| 68 |
if (p_user_info == NULL) |
if (p_user_info == NULL) |
| 69 |
{ |
{ |
| 70 |
log_error("NULL pointer error\n"); |
log_error("NULL pointer error"); |
| 71 |
return -1; |
return -1; |
| 72 |
} |
} |
| 73 |
|
|
| 111 |
ret = query_user_online_info_by_uid(p_user_info->uid, sessions, &session_cnt, 0); |
ret = query_user_online_info_by_uid(p_user_info->uid, sessions, &session_cnt, 0); |
| 112 |
if (ret < 0) |
if (ret < 0) |
| 113 |
{ |
{ |
| 114 |
log_error("query_user_online_info_by_uid(uid=%d, cnt=%d) error: %d\n", |
log_error("query_user_online_info_by_uid(uid=%d, cnt=%d) error: %d", |
| 115 |
p_user_info->uid, session_cnt, ret); |
p_user_info->uid, session_cnt, ret); |
| 116 |
session_cnt = 0; |
session_cnt = 0; |
| 117 |
} |
} |
| 125 |
|
|
| 126 |
if (p + strlen(p_action_title) + 4 >= action_str + sizeof(action_str)) // buffer overflow |
if (p + strlen(p_action_title) + 4 >= action_str + sizeof(action_str)) // buffer overflow |
| 127 |
{ |
{ |
| 128 |
log_error("action_str of user(uid=%d) truncated at i=%d\n", p_user_info->uid, i); |
log_error("action_str of user(uid=%d) truncated at i=%d", p_user_info->uid, i); |
| 129 |
break; |
break; |
| 130 |
} |
} |
| 131 |
*p++ = '['; |
*p++ = '['; |