Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #3517] idomod truncates socket buffer, sending protocol garbage #1195

Closed
icinga-migration opened this issue Jan 2, 2013 · 3 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/3517

Created by mfriedrich on 2013-01-02 20:20:37 +00:00

Assignee: (none)
Status: Rejected (closed on 2014-07-19 12:33:29 +00:00)
Target Version: (none)
Last Update: 2014-12-08 14:46:52 +00:00 (in Redmine)

Icinga Version: 1.10.0
OS Version: any

the current handling of the socket buffer is a bit creepy, just cutting off the buffer and revoking the protocol information for ido2db.

                         , IDO_API_ENDDATA
                        );

                temp_buffer[IDOMOD_MAX_BUFLEN-1] = '\x0';
                ido_dbuf_strcat(&dbuf, temp_buffer);

there should be a way to determine the length of the expected buffer, or even cut it in chunks for output, long_output, perf_data.

the current solution in #2342 limits that to

#define IDOMOD_MAX_BUFLEN                              49152
#define IDOMOD_MAX_TEXT_LEN                            32768

which may harm it too, when hitting huge long_output and perfdata here.
at least, such strings should not be ended with \0 but rather with the IDO_API_ENDDATA flag in order to let ido2db know that the data was sent and ends here (not swapping into the next section).


Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-01-03 20:18:42 +00:00

  • Priority changed from Normal to Low

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-07-19 12:33:29 +00:00

  • Status changed from New to Rejected

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-12-08 14:46:52 +00:00

  • Project changed from 18 to Core, Classic UI, IDOUtils
  • Category changed from 70 to IDOUtils
  • Icinga Version changed from 1 to 1
  • OS Version set to any

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant