File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ fn create_memfile() -> File {
3737 let mut rng = fastrand:: Rng :: new ( ) ;
3838
3939 for _ in 0 ..=4 {
40- let mut name = String :: from ( "softbuffer-" ) ;
40+ let mut name = String :: from ( "/ softbuffer-" ) ;
4141 name. extend ( iter:: repeat_with ( || rng. alphanumeric ( ) ) . take ( 7 ) ) ;
4242 name. push ( '\0' ) ;
4343
Original file line number Diff line number Diff line change @@ -791,13 +791,13 @@ fn create_shm_id() -> io::Result<OwnedFd> {
791791 use posix_shm:: { Mode , OFlags } ;
792792
793793 let mut rng = fastrand:: Rng :: new ( ) ;
794- let mut name = String :: with_capacity ( 23 ) ;
794+ let mut name = String :: with_capacity ( 24 ) ;
795795
796796 // Only try four times; the chances of a collision on this space is astronomically low, so if
797797 // we miss four times in a row we're probably under attack.
798798 for i in 0 ..4 {
799799 name. clear ( ) ;
800- name. push_str ( "softbuffer-x11-" ) ;
800+ name. push_str ( "/ softbuffer-x11-" ) ;
801801 name. extend ( std:: iter:: repeat_with ( || rng. alphanumeric ( ) ) . take ( 7 ) ) ;
802802
803803 // Try to create the shared memory segment.
You can’t perform that action at this time.
0 commit comments