{"record":{"id":"83b340d05aded684","repo":"shadow1ng/fscan","slug":"s-w-minidump-process-name-convert-failed","errorCode":null,"errorMessage":"%s: %w [minidump_process_name_convert_failed]","messagePattern":"(.+?): %w \\[minidump_process_name_convert_failed\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/local/minidump.go","lineNumber":329,"sourceCode":"\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"%s: %w\", i18n.Tr(\"minidump_find_proc_failed\", \"Process32NextW\"), err)\n\t}\n\n\tlstrcmpi, err := pm.kernel32.FindProc(\"lstrcmpiW\")\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"%s: %w\", i18n.Tr(\"minidump_find_proc_failed\", \"lstrcmpiW\"), err)\n\t}\n\n\tret, _, _ := proc32First.Call(snapshot, uintptr(unsafe.Pointer(&pe32)))\n\tif ret == 0 {\n\t\t//nolint:errorlint // Windows LastError不应该wrapped\n\t\treturn 0, fmt.Errorf(i18n.GetText(\"minidump_first_process_failed\")+\" (LastError: %d)\", windows.GetLastError())\n\t}\n\n\tfor {\n\t\tnamePtr, err := syscall.UTF16PtrFromString(name)\n\t\tif err != nil {\n\t\t\treturn 0, fmt.Errorf(\"%s: %w\", i18n.GetText(\"minidump_process_name_convert_failed\"), err)\n\t\t}\n\n\t\tret, _, _ = lstrcmpi.Call(\n\t\t\tuintptr(unsafe.Pointer(namePtr)),\n\t\t\tuintptr(unsafe.Pointer(&pe32.szExeFile[0])),\n\t\t)\n\n\t\tif ret == 0 {\n\t\t\treturn pe32.th32ProcessID, nil\n\t\t}\n\n\t\tret, _, _ = proc32Next.Call(snapshot, uintptr(unsafe.Pointer(&pe32)))\n\t\tif ret == 0 {\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn 0, fmt.Errorf(\"%s\", i18n.Tr(\"minidump_process_not_found\", name))","sourceCodeStart":311,"sourceCodeEnd":347,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/local/minidump.go#L311-L347","documentation":"Wrap inside ProcessManager.findProcessInSnapshot: converting the target process name to a UTF-16 pointer via syscall.UTF16PtrFromString failed (typically an invalid NUL character in the name), so the snapshot walk cannot compare process names. It is an input-encoding error, distinct from the FindProc failures for lstrcmpiW/Process32NextW around it.","triggerScenarios":"Thrown at plugins/local/minidump.go:329 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Sanitize the process name — remove NUL/unexpected control characters","Re-specify the target process name (e.g. lsass.exe) cleanly"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}