mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
MFB: Fixed bug #47721 (Aligment issues in mbstring and sysvshm extension)
This commit is contained in:
parent
01a58c323d
commit
c5649092e2
1 changed files with 1 additions and 1 deletions
|
@ -357,7 +357,7 @@ static int php_put_shm_data(sysvshm_chunk_head *ptr, long key, const char *data,
|
||||||
long total_size;
|
long total_size;
|
||||||
long shm_varpos;
|
long shm_varpos;
|
||||||
|
|
||||||
total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / 4) * 4 + 4; /* 4-byte alligment */
|
total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / sizeof(long)) * sizeof(long) + sizeof(long); /* long alligment */
|
||||||
|
|
||||||
if ((shm_varpos = php_check_shm_data(ptr, key)) > 0) {
|
if ((shm_varpos = php_check_shm_data(ptr, key)) > 0) {
|
||||||
php_remove_shm_data(ptr, shm_varpos);
|
php_remove_shm_data(ptr, shm_varpos);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue