Exploit database

GH-f838dcf62fc9fa430d033ea61489fdd5

wonjj6768/lenovo-tb365fc-ghostlock-cve-2026-43499

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

165 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files7

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

su/src/uid.h

Text · 736 bytes
#ifndef ROOTD_UID_H
#define ROOTD_UID_H

#include <errno.h>
#include <stdint.h>
#include <stdlib.h>

/* Decimal uint32 UID with optional surrounding spaces/tabs; no sign or suffix.
 * Return 0 and store *out on success, -1 on invalid input. */
static inline int parse_uid_token(const char *s, uint32_t *out) {
    if (!s) return -1;
    while (*s == ' ' || *s == '\t') s++;
    if (*s < '0' || *s > '9') return -1; /* empty, sign, or non-digit */
    errno = 0;
    char *end = NULL;
    unsigned long v = strtoul(s, &end, 10);
    if (errno != 0 || end == s) return -1;
    while (*end == ' ' || *end == '\t') end++;
    if (*end != '\0') return -1;
    if (v > 0xffffffffUL) return -1;
    *out = (uint32_t)v;
    return 0;
}

#endif