From f5eac11fe859594581ac18223b08a9de0d5a7c0d Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Fri, 6 Dec 2013 13:56:37 +0000 Subject: [PATCH] Do not rename printercache blob if we dont have source and dest name. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1776 423420c4-83ab-492f-b58f-81f9feb106b5 --- printercache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/printercache.c b/printercache.c index 2b9f2f1..76d5cbd 100644 --- a/printercache.c +++ b/printercache.c @@ -3,6 +3,8 @@ Entrypoint and utility functions Copyright (C) Matthew Chapman 1999-2008 Copyright (C) Jeroen Meijer 2003-2008 + Copyright (C) Henrik Andersson 2013 + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -249,7 +251,8 @@ printercache_process(STREAM s) rdp_in_unistr(s, printer_length, &printer, &printer_length); rdp_in_unistr(s, driver_length, &driver, &driver_length); - printercache_rename_blob(printer, driver); + if (printer != NULL && driver != NULL) + printercache_rename_blob(printer, driver); free(printer); free(driver);