Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jul 1996 14:34:10 -0700
From:      "Jin Guojun[ITG]" <jin@george.lbl.gov>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        bugs@freebsd.org
Subject:   Re: ipcs.c bug -- fixing attached
Message-ID:  <199607182134.OAA00092@george.lbl.gov>

next in thread | raw e-mail | index | archive | help
} > Wrong argument msginfo used for shminfo. It causes core dump on command
} > ipcs -m
} 
} Thanks, about to commit it.

You are welcome.

} > Here is the fixing:
} > 
} > ------------------ usr/src/usr.bin/ipcs: patch ------------------------------
} > diff ipcs.c ipcs.c.new
} > 313c313
} 
} Please, better submint context diffs (-c or -u).

Yup, I forget to mention the version #. I tought it is a simple line, the
patch should find it without a problem.  Here is the diff -c one:


*** ipcs.c	Thu Jul 18 14:30:02 1996
--- ipcs.c.new	Thu Jul 18 09:51:11 1996
***************
*** 310,316 ****
  			struct shmid_ds *xshmids;
  
  			kvm_read(kd, symbols[X_SHMSEGS].n_value, &shmsegs, sizeof(shmsegs));
! 			xshmids = malloc(sizeof(struct shmid_ds) * msginfo.msgmni);
  			kvm_read(kd, (u_long) shmsegs, xshmids, sizeof(struct shmid_ds) *
  			    shminfo.shmmni);
  
--- 310,316 ----
  			struct shmid_ds *xshmids;
  
  			kvm_read(kd, symbols[X_SHMSEGS].n_value, &shmsegs, sizeof(shmsegs));
! 			xshmids = malloc(sizeof(struct shmid_ds) * shminfo.shmmni);
  			kvm_read(kd, (u_long) shmsegs, xshmids, sizeof(struct shmid_ds) *
  			    shminfo.shmmni);
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607182134.OAA00092>