Check-in [d0fa9eee56]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use a signed type to avoid an infinite loop in socket_send(); socket_receive() is already fine.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:d0fa9eee56daa1476e7ae8a977b3e9d1cdc666469ed2de88c30cd0b9ab17ecd5
User & Date: andybradford 2018-10-19 22:12:41
References
2018-10-19
22:37
Now that type has changed due to [d0fa9eee56], cast back to match total variable. check-in: 77371043a4 user: andybradford tags: trunk
Context
2018-10-19
22:37
Now that type has changed due to [d0fa9eee56], cast back to match total variable. check-in: 77371043a4 user: andybradford tags: trunk
22:12
Use a signed type to avoid an infinite loop in socket_send(); socket_receive() is already fine. check-in: d0fa9eee56 user: andybradford tags: trunk
2018-10-17
23:53
Enhance the security-audit page to detect insecurities resulting from having self-registration enabled. This is a work in progress. More testing and more checks are needed in this area. check-in: 724ccc46f2 user: drh tags: trunk
Changes

Changes to src/http_socket.c.

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
  return rc;
}

/*
** Send content out over the open socket connection.
*/
size_t socket_send(void *NotUsed, const void *pContent, size_t N){
  size_t sent;
  size_t total = 0;
  while( N>0 ){
    sent = send(iSocket, pContent, N, 0);
    if( sent<=0 ) break;
    total += sent;
    N -= sent;
    pContent = (void*)&((char*)pContent)[sent];







|







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
  return rc;
}

/*
** Send content out over the open socket connection.
*/
size_t socket_send(void *NotUsed, const void *pContent, size_t N){
  ssize_t sent;
  size_t total = 0;
  while( N>0 ){
    sent = send(iSocket, pContent, N, 0);
    if( sent<=0 ) break;
    total += sent;
    N -= sent;
    pContent = (void*)&((char*)pContent)[sent];