{"record":{"id":"892bc56e0926d436","repo":"rustdesk/rustdesk","slug":"cliprdr-out-of-memory","errorCode":null,"errorMessage":"cliprdr out of memory","messagePattern":"cliprdr out of memory","errorType":"exception","errorClass":"CliprdrError","httpStatus":null,"severity":"error","filePath":"libs/clipboard/src/lib.rs","lineNumber":77,"sourceCode":"    /// set to be stopped\n    fn set_is_stopped(&mut self) -> Result<(), CliprdrError>;\n    /// clear the content on clipboard\n    fn empty_clipboard(&mut self, conn_id: i32) -> Result<bool, CliprdrError>;\n    /// run as a server for clipboard RPC\n    fn server_clip_file(&mut self, conn_id: i32, msg: ClipboardFile) -> Result<(), CliprdrError>;\n    /// get the progress of the paste task.\n    fn get_progress_percent(&self) -> Option<ProgressPercent>;\n    /// cancel the paste task.\n    fn cancel(&mut self);\n}\n\n#[derive(Error, Debug)]\npub enum CliprdrError {\n    #[error(\"invalid cliprdr name\")]\n    CliprdrName,\n    #[error(\"failed to init cliprdr\")]\n    CliprdrInit,\n    #[error(\"cliprdr out of memory\")]\n    CliprdrOutOfMemory,\n    #[error(\"cliprdr internal error\")]\n    ClipboardInternalError,\n    #[error(\"cliprdr occupied\")]\n    ClipboardOccupied,\n    #[error(\"conversion failure\")]\n    ConversionFailure,\n    #[error(\"failure to read clipboard\")]\n    OpenClipboard,\n    #[error(\"failure to read file metadata or content, path: {path}, err: {err}\")]\n    FileError { path: String, err: std::io::Error },\n    #[error(\"invalid request: {description}\")]\n    InvalidRequest { description: String },\n    #[error(\"common request: {description}\")]\n    CommonError { description: String },\n    #[error(\"unknown cliprdr error\")]\n    Unknown(u32),\n}","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/rustdesk/rustdesk/blob/91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540/libs/clipboard/src/lib.rs#L59-L95","documentation":"CliprdrError::CliprdrOutOfMemory variant ('cliprdr out of memory'): the clipboard backend (typically the FUSE/cliprdr bridge) exhausted memory while allocating buffers for a file-list or file-contents operation. Large clipboard file transfers allocate proportionally to the advertised data size, so an oversized or malicious file list from the remote peer can trip this guard.","triggerScenarios":"Thrown at libs/clipboard/src/lib.rs:77 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Cap the number/size of entries accepted in a clipboard file list before allocating","Free and re-request in smaller chunks rather than buffering whole file contents","If triggered by a remote peer's advertisement, drop the clipboard session and re-negotiate instead of retrying the same allocation"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540","analyzedAt":"2026-09-10T19:53:44.083Z","contentChangedAt":"2026-09-10T19:53:44.083Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}