Merge pull request #354 from enodata/master
Add libgen.h include and guard against basename(3) modifying its arg
This commit is contained in:
		
						commit
						18b06ed459
					
				| @ -13,6 +13,7 @@ | ||||
| #include <sys/wait.h> | ||||
| #include <time.h> | ||||
| #include <unistd.h> | ||||
| #include <libgen.h> | ||||
| 
 | ||||
| #include "dbus.h" | ||||
| #include "dunst.h" | ||||
| @ -313,10 +314,12 @@ int notification_init(notification * n, int id) | ||||
|                 n->markup); | ||||
| 
 | ||||
|         if (n->icon) { | ||||
|                 n->msg = notification_replace_format("%I", basename(n->icon), | ||||
|                 char *tmp = g_strdup(n->icon); | ||||
|                 n->msg = notification_replace_format("%I", basename(tmp), | ||||
|                         n->msg, MARKUP_NO); | ||||
|                 n->msg = notification_replace_format("%i", n->icon, | ||||
|                         n->msg, MARKUP_NO); | ||||
|                 g_free(tmp); | ||||
|         } | ||||
| 
 | ||||
|         if (n->progress) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nikos Tsipinakis
						Nikos Tsipinakis