Text   |  XML   |  ReML   |   Visible Warnings:

Cast Alters Value  at iax2_analysis.c:2264

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

copy_file

(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/iax2_analysis.c)expand/collapse
Show more  
 2227  static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t *user_data)
 2228  {
 2229          int to_fd, forw_fd, rev_fd, fread = 0, rread = 0, fwritten, rwritten;
 2230          gchar f_pd[1] = {0};
 2231          gchar r_pd[1] = {0};
 2232          gint16 sample;
 2233          gchar pd[4];
 2234          guint32 f_write_silence = 0;
 2235          guint32 r_write_silence = 0;
 2236          progdlg_t *progbar;
 2237          guint32 progbar_count, progbar_quantum, progbar_nextstep = 0, count = 0;
 2238          gboolean stop_flag = FALSE;
 2239          size_t nchars;
 2240   
 2241          forw_fd = ws_open(user_data->f_tempname, O_RDONLY | O_BINARY, 0000 /* no creation so don't matter */);
 2242          if (forw_fd < 0)
 2243                  return FALSE;
 2244          rev_fd = ws_open(user_data->r_tempname, O_RDONLY | O_BINARY, 0000 /* no creation so don't matter */);
 2245          if (rev_fd < 0) {
 2246                  ws_close(forw_fd);
 2247                  return FALSE;
 2248          }
 2249   
 2250          /* open file for saving */
 2251          to_fd = ws_open(dest, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
 2252          if (to_fd < 0) {
 2253                  ws_close(forw_fd);
 2254                  ws_close(rev_fd);
 2255                  return FALSE;
 2256          }
 2257   
 2258          progbar = create_progress_dlg("Saving voice in a file", dest, TRUE, &stop_flag);
 2259   
 2260          if      (format == SAVE_AU_FORMAT) /* au format */
 2261          {
 2262                  /* First we write the .au header. XXX Hope this is endian independant */
 2263                  /* the magic word 0x2e736e64 == .snd */
 2264                  phtonl(pd, 0x2e736e64);
Show more  




Change Warning 4386.30133 : Cast Alters Value

Because they are very similar, this warning shares annotations with warnings 4386.30134, 4386.30135, 4386.30141, 4386.30142, and 4386.30143.

Priority:
State:
Finding:
Owner:
Note: