util  Diff

Differences From Artifact [c9d2d3baea]:

To Artifact [bebef73805]:


   331    331   
   332    332   	size_t nsz;
   333    333   	const char* basename = argv[0], *p;
   334    334   	for (p = argv[0]; *p!=0; ++p) {
   335    335   		if(*p == '/') basename = p + 1;
   336    336   	}
   337    337   	nsz = p - basename;
   338         -	char shid[nsz + sizeof shmem_prefix + 0];
          338  +	char shid[nsz + sizeof shmem_prefix];
   339    339   	strncpy(shid,shmem_prefix,sizeof shmem_prefix);
   340    340   	strncpy(shid + sizeof shmem_prefix - 1, basename, nsz);
          341  +	shid[nsz + sizeof shmem_prefix - 1] = 0;
   341    342   
   342    343   	if (op == mode_go) {
   343    344   		int fd;
   344    345   		if ((fd = shm_open(shid, O_RDWR, 0600)) == -1) {
   345    346   			const char* args[] = {
   346    347   				"urxvtc", "-bg", "[90]#4b0024",
   347    348   				          "-e",  argv[0],