com php-src: Fixed wrong size of key length: ext/standard/html.c
| From: | Dmitry Stogov | Date: | Mon, 24 Feb 2014 08:24:08 +0000 |
| Subject: | com php-src: Fixed wrong size of key length: ext/standard/html.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77973@lists.php.net to get a copy of this message | ||
Commit: 4fb57d7f4f7b7e8c71c5d195db9d035c1fd02805
Author: Xinchen Hui <laruence@gmail.com> Mon, 24 Feb 2014 16:24:08 +0800
Parents: 22e42c25ab2eeeeb85d7f969fdb70bd57971fa52
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4fb57d7f4f7b7e8c71c5d195db9d035c1fd02805
Log:
Fixed wrong size of key length
Changed paths:
M ext/standard/html.c
Diff:
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 8a9da90..57fb9ea 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -1546,7 +1546,7 @@ static inline void write_s3row_data(
size_t l = r->data.ent.entity_len;
memcpy(&entity[1], r->data.ent.entity, l);
entity[l + 1] = ';';
- add_assoc_stringl_ex(arr, key, written_k1 + 1, entity, l + 2, 1);
+ add_assoc_stringl_ex(arr, key, written_k1, entity, l + 2, 1);
} else {
unsigned i,
num_entries;
@@ -1556,7 +1556,7 @@ static inline void write_s3row_data(
size_t l = mcpr[0].leading_entry.default_entity_len;
memcpy(&entity[1], mcpr[0].leading_entry.default_entity, l);
entity[l + 1] = ';';
- add_assoc_stringl_ex(arr, key, written_k1 + 1, entity, l + 2, 1);
+ add_assoc_stringl_ex(arr, key, written_k1, entity, l + 2, 1);
}
num_entries = mcpr[0].leading_entry.size;
for (i = 1; i <= num_entries; i++) {
@@ -1579,7 +1579,7 @@ static inline void write_s3row_data(
memcpy(&entity[1], mcpr[i].normal_entry.entity, l);
entity[l + 1] = ';';
entity[l + 1] = '\0';
- add_assoc_stringl_ex(arr, key, written_k1 + written_k2 + 1, entity, l + 1, 1);
+ add_assoc_stringl_ex(arr, key, written_k1 + written_k2, entity, l + 1, 1);
}
}
}