Skip to content
Snippets Groups Projects
Commit 4c6c7a80 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

Close the string before the use.

Typo fix
parent 12ca2edf
No related branches found
No related tags found
No related merge requests found
...@@ -31,12 +31,12 @@ By understanding these identifiers and their replacements, you can effectively c ...@@ -31,12 +31,12 @@ By understanding these identifiers and their replacements, you can effectively c
Original file: `dbus@` Original file: `dbus@`
``` ```
[main] [Main]
Type = classic Type = classic
Version = 0.7.0 Version = 0.7.0
Description = "dbus session daemon for @U user" Description = "dbus session daemon for @U user"
User = ( user ) User = ( user )
Maxdeath = 3 MaxDeath = 3
Notify = 4 Notify = 4
TimeoutStart = 3000 TimeoutStart = 3000
...@@ -50,7 +50,7 @@ By understanding these identifiers and their replacements, you can effectively c ...@@ -50,7 +50,7 @@ By understanding these identifiers and their replacements, you can effectively c
/usr/bin/s6-rmrf ${Socket} /usr/bin/s6-rmrf ${Socket}
) )
[environment] [Environment]
Args=!--session --print-pid=4 --nofork --nopidfile --address=unix:path=${Socket} Args=!--session --print-pid=4 --nofork --nopidfile --address=unix:path=${Socket}
Socket=!@R/bus Socket=!@R/bus
``` ```
...@@ -58,12 +58,12 @@ By understanding these identifiers and their replacements, you can effectively c ...@@ -58,12 +58,12 @@ By understanding these identifiers and their replacements, you can effectively c
Result after calling `66 parse dbus@oblive` where *oblive* has UID `1000` Result after calling `66 parse dbus@oblive` where *oblive* has UID `1000`
``` ```
[main] [Main]
Type = classic Type = classic
Version = 0.7.0 Version = 0.7.0
Description = "dbus session daemon for oblive user" Description = "dbus session daemon for oblive user"
User = ( user ) User = ( user )
Maxdeath = 3 MaxDeath = 3
Notify = 4 Notify = 4
TimeoutStart = 3000 TimeoutStart = 3000
...@@ -77,7 +77,7 @@ By understanding these identifiers and their replacements, you can effectively c ...@@ -77,7 +77,7 @@ By understanding these identifiers and their replacements, you can effectively c
/usr/bin/s6-rmrf ${Socket} /usr/bin/s6-rmrf ${Socket}
) )
[environment] [Environment]
Args=!--session --print-pid=4 --nofork --nopidfile --address=unix:path=${Socket} Args=!--session --print-pid=4 --nofork --nopidfile --address=unix:path=${Socket}
Socket=!/run/user/1000/bus Socket=!/run/user/1000/bus
``` ```
......
...@@ -189,9 +189,11 @@ int identifier_replace(stralloc *sasv, char const *svname) ...@@ -189,9 +189,11 @@ int identifier_replace(stralloc *sasv, char const *svname)
char store[SS_MAX_PATH_LEN] ; char store[SS_MAX_PATH_LEN] ;
_alloc_sa_(sa) ; _alloc_sa_(sa) ;
if (!stralloc_copyb(&sa, sasv->s, sasv->len)) if (!stralloc_copyb(&sa, sasv->s, sasv->len) || !stralloc_0(&sa))
return 0 ; return 0 ;
sa.len-- ;
while(identifier_table[pos].ident) { while(identifier_table[pos].ident) {
r = (*identifier_table[pos].func)(store, svname) ; r = (*identifier_table[pos].func)(store, svname) ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment